

InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
2001. |
Solve : Modem speed command? |
Answer» i waz wondering if there was a command(or function) that DETERMINES and tells you the average speed of a modem, while its downloading stuff. but is there such a function or command and on WAT prog languege?UH... doesn't it SAY when you are downloading...? (downloading at 5 kbs / sec)yea, it does. |
|
2002. |
Solve : how to i make a batch file start when i login? |
Answer» im fairly new at batch and i have made a program and i want to make it so that it will run automatically when i log in. how do i do this?On a Win9x machine, put a reference to the file in your autoexec.bat file found in the root directory of the boot drive. |
|
2003. |
Solve : Net meeting from "windows vista" to "windows Xp"? |
Answer» hi to all, |
|
2004. |
Solve : scripting Vs programing? |
Answer» Can ANYBODY please tell me the difference between scripting and programing. Can anybody please tell me the difference between scripting and programing.you should not be too concerned about their differences. What matters is WHETHER you can get them to do what you want. scripts are used on the web like JavaScript. programs are used on the computer just the computer, but programs can be used in small networks.Quote from: macdad- on February 05, 2008, 02:21:29 PM scripts are used on the web like JavaScript.Actually the line isn't that clear. Many scripting languages are not for web use. Like Windows' own scripting languages Batch, VBScript and Powershell. And some programming languages can be used on web sites.. like Java or Silverlight. Quote from: Deerpark on February 06, 2008, 12:53:59 PM Actually the line isn't that clear.correction. Vbscript is used in ASP. so yes, it can be used for the web. Oh yeah so it is. And speaking of ASP it really adds to the CONFUSION since you can use all the .NET programming languages in ASP.NET."A scripting language, script language or extension language, is a programming language that controls a software application. "Scripts" are often treated as distinct from "programs", which execute independently from any other application. At the same time they are distinct from the core code of the application, which is usually written in a different language, and by being accessible to the end user they enable the behavior of the application to be adapted to the user's needs. " i have quoted this from "http://en.wikipedia.org/wiki/Scripting_language" n i think it is also clear from WAT is stated above. thnk u |
|
2005. |
Solve : C++ help? |
Answer» Hello. #include <cstdlib> I use Dev cpp...turbo c++ is the best compiler. an i am unable to understand wat do u mean by "full screen" is that u want to run application having GUI? |
|
2006. |
Solve : displaying a graphics file? |
Answer» Perhaps some one can SUGGEST the simplest manner of writing a program which displays a graphics file, such as a gif file. Let's assume that I understand the manner in which the pixels are stored in a gif file. Let's assume that I can utilized any common programming language, such as C++, or QBasic, or assembly language. |
|
2007. |
Solve : please help for loop statement? |
Answer» GUYS give me a code of for loop statement please..you write the whole code in c++ structure....thxTry this and this and any of the other 398,998 hits on Google. Good luckin vb6 its (for an endless loop that eventually freezes the program) Quote theplaceuwanttogo: 1) theplaceuwanttogo: symbols the goto 2 lines down where to go back to 2) beep --- simple system beep, but gets annying when repeated 3) goto theplaceuwanttogo --- telling the computer that once it reaches line 3 to simply "goto (PLACE)" then put the place SOMEWHERE elce... but this is vb6 so its probably different... i just felt LIKE posting Yuck!!! Goto!!! The start of spaghetti coding...LOL Yuck indeed Dusty. The scourge of goto needs to be stopped. for more interesting results try Code: [Select]Do while True Dim x as String = InputBox("Enter password") If x = "Some Text" then Exit Do Beep Msgbox("Incorrect Password.") Loopgrr **shakes fist** im still a bit new at this |
|
2008. |
Solve : I have a vb6 game im working on... cant get player to go to another room.? |
Answer» i have 2 objects on my program, an IMAGE NAMED IMAGE1, and a label, named label1. how do i get it when the 2 collide to open a new form, form2. |
|
2009. |
Solve : Autonumber problem in Access database? |
Answer» I exported data from an Access DATABASE to Excel, manipulated the data, and then imported it into a modified version of the original Access database. The imported data contained the original autonumbers assigned to each record. When a new record was added, the AUTONUMBER assigned to the record wasn't the next consecutive number. It wasn't even close. and then imported it into a modified version of the original Access database How did you MODIFY the database? UNLESS there is a relationship between the data and the autonumber there is no reason to reset it. If you MUST reset the autonumber, you can try this. |
|
2010. |
Solve : Deleting Files Using Vbs? |
Answer» I am kind of new to visual basic script and I am wondering how I can delete files and folders using it? Is there a delete command?i know there is the Kill command, but thats for processes... gime a sek i have tons of old code on my pc... |
|
2011. |
Solve : Batch in Vista\ REALLY NEED YOUR HELP? |
Answer» Hi, and thank you for reading that. Very nicely written code. Very readable. I can't understand, why is that working on XP for 100% and not working on Vista at all. I mean it is working, but it runs only the first opened file 0141.bat, and it doesn't matter what is the result [I mean whether it has changed the IP or not] it won't go on to 0142.bat. Why :S ?It's doubtful Microsoft would change batch file behavior for Vista. Try turning echo on; by scrolling back the cmd window you should be ABLE to see how the file runs and what paths it follows on the if statements. The errorlevel values seem to be the only decision making logic points in the file. Quote :connect If I read this right (no pun), the first if checks for negative errorlevels (not 0 and not greater than zero); the second if checks for zero and positive errorlevels. Negative errorlevels are possible but rare. My guess is you always end up in :curl1. If this is correct, then fine. You may want to check this though. Quote Isn't that the same? ERRORLEVEL 1 and NOT ERRORLEVEL 0 ? "IF errorlevel 1" means "if errorlevel is 1 or greater", and "If not errorlevel 0" means "if errorlevel is not equal to 0" |
|
2012. |
Solve : outlook vba quesiton...? |
Answer» Ok, I was thinking of running the vba in powerpoint so as to leave outlook free, though I do not know what effect looping code in VBA with one microsoft program does to the functionality of other MS programs. I GUESS unless you were willing to let the vba in outlook start up powerpoint and then let it go "hands fee" you would probably have the same problem no matter which ms program was running the original code.Quote Since it's working now and it 's only intended to be used for the next 2-3 weeks I'll probably leave it there, but not bad for a first timer!!! Congrats! You'll be a whiz by the time March Madness 2009 rolls around. Quote from: Sidewinder on March 11, 2008, 03:47:27 PM Congrats! You'll be a whiz by the time March Madness 2009 rolls around. There is talk of leaving one of the machines with this on, as the sales manager is well impressed. I think he's trying to blag a 50" screen for the display as we speak. I might have ago at tiding it up a little. If I posted all the code, would you guys run your eye's over it?? let me know if I could make any changes to improve it?? cheersI'm willing to look it over, and not just because I could use it to set up a movie clip to play on my comp everytime I get new mail . I figure it helps to have someone else go through your code as their logic may be different from your own and they may also know of shortcuts that you don't.outlook code (main PAGE) Code: [Select]Public WithEvents TargetFolderItems As Items Public path As String Private Sub Application_Startup() 'Declare MAPI folder Dim ns As Outlook.NameSpace 'Set the default folder Set ns = Application.GetNamespace("MAPI") Set TargetFolderItems = ns.GetDefaultFolder(olFolderInbox).Items Set ns = Nothing End Sub Private Sub TargetFolderItems_ItemAdd(ByVal Item As Object) 'Declare attachment & sender variables Dim olAtt As Attachment Dim olApp As Outlook.Application Dim olNs As Outlook.NameSpace Dim olMyParentFolder As MAPIFolder Dim olMoveToFolder As MAPIFolder Dim olNewItem As Object Dim olSubject As String Dim olsubjectna As String Dim olsubjectna1 As String Dim olsubjectna2 As String Dim olAttach As String Dim sender As String Dim olDate As Date 'exit sub if undeliverable message as errors olsubjectna = "Undeliverable*" olsubjectna1 = "Read:*" olsubjectna2 = "Not Read:*" If Item.Subject Like olsubjectna Then Exit Sub End If If Item.Subject Like olsubjectna1 Then Exit Sub End If If Item.Subject Like olsubjectna2 Then Exit Sub End If 'Declare the sender address 'sender = "[emailprotected]" 'declare subject criteria (march madness File) ' looks for subject containing "Projection" olSubject = "*March Madness*" 'If Item.SenderEmailAddress = sender Then 'When a new mail comes into the inbox check to see if it has an attachment and evaluate the sender 'Select Case Item.Subject 'is the mail subject _SALES_TARGET_UPLOAD? 'MsgBox "Mail Received!" If Item.Subject Like olSubject Then 'pass file/path VARIABLE to IsFileOpen function. If True If IsFileOpen("C:\march madness\March.ppt") = True Then 'MsgBox "condition correct!" 'saves and close's current open ppt Set objppt = CreateObject("PowerPoint.Application") objppt.Visible = True Set objPresentation = objppt.Presentations("C:\march madness\MM Projection v 2.ppt") objPresentation.Saved = True objPresentation.Close objppt.Quit 'MsgBox "Powerpoint closed" create_directory End If Set olAtt = Item.Attachments(1) olAtt.SaveAsFile "C:\March Madness\" & olAtt 'MsgBox "file saved" Set objshell = CreateObject("Wscript.Shell") objshell.Run "C:\powerSTART.bat" End If Set olApp = Nothing Set olNs = Nothing Set olMyParentFolder = Nothing Set olMoveToFolder = Nothing Set olNewItem = Nothing Set olAtt = Nothing End Sub outlook modual code; Code: [Select]'declare application and workbook variables Public objExcel As PowerPoint.Application Public objWB As PowerPoint.Presentation Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Sub create_directory() 'MsgBox "GOT to create directory" 'checks if the march madness folder exist Dim PoExists As Boolean 'pass arguments to function PoExists = FileOrDirExists("C:\march madness\") 'if the path(s) don't exist, create directories If PoExists = FALSE Then MkDir ("C:\march madness\") End If End Sub Public Function IsFileOpen(FileName As String) As Boolean 'this function checks to see if a file is already open 'returns true if open 'declare variables Dim iFilenum As Long Dim iErr As Long 'check for lock file On Error Resume Next iFilenum = FreeFile() Open FileName For Input Lock Read As #iFilenum Close iFilenum 'assign number iErr = Err On Error GoTo 0 'select the outcome Select Case iErr Case 0: IsFileOpen = False Case 70: IsFileOpen = True 'file not found Case 53: IsFileOpen = False Case Else: Error iErr End Select End Function Sub delete_from_imported_dir() On Error GoTo ErrHandler 'delete all files from imported extracts directory Kill "C:\Oracle VB\Sales Target Upload\Imported Extracts\*" 'if no files in the directory exit sub (err_number 53) ErrHandler: Exit Sub End Sub End Sub Function FileOrDirExists(PathName As String) As Boolean 'function returns true if the specified directory/file exists Dim sTemp As String 'Ignore errors to allow for error evaluation On Error Resume Next sTemp = GetAttr(PathName) 'Check if error exists (0 = exists) Select Case Err.Number Case Is = 0 FileOrDirExists = True Case Else FileOrDirExists = False End Select 'Resume error checking On Error GoTo 0 End Functionbatch file starting vbs: Code: [Select]@echo off ping localhost 2 >nul start c:\power.vbs exit vbs code starting powerpoint: Code: [Select]Dim strComputer, strProcess, strProcessID strComputer = "." strProcess = "wscript.exe" Function IsProcessRunning( strComputer, strProcess ) Dim Process, strObject IsProcessRunning = False strObject = "winmgmts://" & strComputer For Each Process in GetObject( strObject ).InstancesOf( "win32_process" ) If UCase( Process.name ) = UCase( strProcess ) Then IsProcessRunning = True strProcessID = Process.ProcessID ' Wscript.Echo "Process ID: " & strProcessID Exit Function End If Next End Function If( IsProcessRunning( strComputer, strProcess ) = True ) Then ' Wscript.Echo "Killing " & strProcessID ' ------ SCRIPT CONFIGURATION ------ intPID = strProcessID ' ------ END CONFIGURATION --------- ' WScript.Echo "Process PID: " & intPID set objWMIProcess = GetObject("winmgmts:\\" & strComputer & _ "\root\cimv2:Win32_Process.Handle='" & intPID & "'") ' WScript.Echo "Process name: " & objWMIProcess.Name intRC = objWMIProcess.Terminate() if intRC = 0 Then powerpoint end if End If sub powerpoint() ' Wscript.echo ("starting powerpoint") Const ppAdvanceOnTime = 2 Const ppShowTypeKiosk = 3 Const ppSlideShowDone = 5 Set objPPT = CreateObject("PowerPoint.Application") objPPT.Visible = True Set objPresentation = objPPT.Presentations.Open("C:\march madness\MM Projection v 2.ppt") objPresentation.Slides.Range.SlideShowTransition.AdvanceTime = 5 objPresentation.Slides.Range.SlideShowTransition.AdvanceOnTime = True objPresentation.SlideShowSettings.AdvanceMode = ppAdvanceOnTime objPresentation.SlideShowSettings.ShowType = ppShowTypeKiosk objPresentation.SlideShowSettings.StartingSlide = 1 objPresentation.SlideShowSettings.EndingSlide = 2 objpresentation.slideshowsettings.loopuntilstopped = True Set objSlideShow = objPresentation.SlideShowSettings.Run.View Do Until objppt = SlideShowEnd If Err <> 0 Then Exit Do End If Loop WScript.Quit end sub enjoy!!! Yikes! You certainly do get knee deep into the code. If it works, don't change a thing. Perhaps you could persuade your boss to pay you by the word! |
|
2013. |
Solve : Intro to C++? |
Answer» Hi folks |
|
2014. |
Solve : In java? |
Answer» I WANT a java SCRIPT that does, wheni refresh my page an alert POPS up asking for conformation with two options namely "YES or NO" |
|
2015. |
Solve : C++ loading questions? |
Answer» I am THINKING about making my own program that protects my COMPUTER from viruses, but I need help with 1 THING right now. |
|
2016. |
Solve : A simple Excel spreadsheet (without Marcos) than can predict 3-digit Numbers? |
Answer» I am looking for a simple Excel spreadsheet (no Marcos) than when You Enter past 3-digit Numbers can generate 5 new 3-digit numbers. Like for example 159 was drawn and use that NUMBER (159) to come up with 5 new (3-digit numbers). So it would be based on past number or a few past numbers. You can use formulas in the other five cells. By using the value typed into the original cell you can generate values for the other five cells. So it would be based on past number or a few past numbers. You could KEEP a history of past numbers EITHER on another worksheet or in hidden cells on the main worksheet. Keep in mind that past performance is no guarantee of future results. That is Great, but what are the formulas in the other 5 cells for the value typed in the original cell?I can't really give you any specific formulas, but I can show you the mechanics of setting this up: Assume cell A1 is where the 3 digit number is entered. In cell D4 you could put the formula =(A1*3); in cell E7 you could put the formula =(A1^2); repeat, using other formulas in any other 3 cells. As soon as the 3 digit number is entered in A1, the other cells will recalculate based on the A1 value. Of COURSE it will be your job to come up with formulas that guarantee all the results will be 3 digit numbers. Good luck. Just curious, but why no macros? |
|
2017. |
Solve : Writing Batch Files? |
Answer» I need some help in writing a batch file that would backup like *.JPG *.wmv *.jif FILES with a DATE stamp of either CURRENT date or a date entered by user to a flash drive. I am using XP. |
|
2018. |
Solve : Java scripting Need help? |
Answer» im having to make a really interactive website that is user friendly (textbox, blogs, and bbs's) the program im using to create the website is Frontpage EXPRESS. it has a scripting feature that allows u to create JAVA scripts. any one have a few POINTERS?JAVASCRIPT for frontpage expresshttp://www.fluffbucket.com/fpe/javascript.htm |
|
2019. |
Solve : Where to begin programing? |
Answer» hello all. I've began to take an interest in creating programs but i don't know where to begin. i want to know how programing began and want to begin at the very roots of programing. ive READ some stuff like c++ , interpreters, and VISUAL basic but i dont know what all that is. I've read how to WRITE COMMANDS like print but i want to know why the word print and and how it works. i want to know everything there is know from the roots about programing. i also want to know stuff like batch files and all the other stuff. i want to know everyting about computers. does any one know where i can begin or stuff to read. Any one have any Tips for me?Read Visual Basic.net for beginners, or just google computer programming and CHOOSE the wikipedia result.here go to this website |
|
2020. |
Solve : VB code question maybe?? |
Answer» umm IM not sure about this. i have tried looking for how to create these notify icons and i made one but how do i get it to show up? do i have to make a code for it or what?and also now that i think about it, i have another question... Textboxes don't have a text property after version 6.0. it is a .Value property. Rubbish, I use VB.NET 2003 and VB.NET 2008 and both have a .text property!Quote I use VB.NET 2003 and VB.NET 2008 and both have a .text property! Ditto for VB.Net 2005 Even the IntelliSense shows a .text property but no .value property for a textbox. Oops sorry- maybe I'm thinking of the first .NET Framework? Or maybe I'm just confused... I've only really created class libraries in .NET. Please forgive me :O |
|
2021. |
Solve : Help with Python? |
Answer» Hello everyone im begining to learn python as my first COMPUTER language but im haveing trouble starting the IDLE Python GUE but the python command line does. im think maybe i downloaded the wrong one . my computer is win xp home edition. if u know what i should dowload from the Python website PLEASE help. p.s if u know any good python tutorials let me know.I never had a problem with that. |
|
2022. |
Solve : How the heck do I draw stuff in VB.NET?? |
Answer» Alright I have Visual Studio 2005 professional. |
|
2023. |
Solve : Time.h? |
Answer» In c/c++ I'm trying to learn about time.h. |
|
2024. |
Solve : Does anyone know VB.Net really good?? |
Answer» I need help on VB.net and I need it fast. Does ANYONE KNOW VB.net really good and can go into a personal chat with me? Please. I know some VB.net and I can probably find what I don't know. Plus I've got a LOT of experience with C# dot NET and the languages are PRETTY similar. But I can't get into a personal chat with you. Any ASSISTANCE will be on this forum.Contact me via my forum, and I'll personal chat you through that. |
|
2025. |
Solve : Layer in VB.NET? |
Answer» I am trying to draw SOMETHING on a TAB control but it seems that if i draw a graph my DRAWING will be place behide the TAB. If i try to draw ANYTHING over controls it will be place behided. |
|
2026. |
Solve : I need Help with VisualBasic.net? |
Answer» Can someone please help me with VisualBasic.net??? I am new to VB.net and I am having problems with a code. The question is I have two txtboxes and two btn. I need to get the info to transfer from box ONE to box two when I push the opposite btn. SUch as push btn 1 and the text in box one transfers to box two. push btn two and the text in box two transfers to box one. can anyone help? and if so can you be a tutor for me?Certainly. You MIGHT CONSIDER telling us what you want you want help for. |
|
2027. |
Solve : New to VB Express How do i work with Dll's? |
Answer» 1. but how do i find out what usb port # its on?It won't be port 1, i'm not sure what that is, i was just using an example. I don't actually know, nor do I know how to find out... maybe someone ELSE knows how to find out?ok i change the number to many TIMES and still i get the same error message.Code: [Select]Imports LEGOVPBrickLib |
|
2028. |
Solve : help restore back up !!!? |
Answer» I am having trouble restoring a bkf file. I GOT a new hard drive and I am TRYING to restore the back up from my OLD hard drive. I used the windows back up program. But now when I try to restore it TELLS me it is UNRECOGNIZABLE and can not be used. HELP! |
|
2029. |
Solve : visual basic version? |
Answer» hi guys. i want to INSTALL visual basic. but i dont know if what version of VB is ideal to use?ALWAYS use the newest. Go to the microsoft website and download VB.net 2008 Express Edition. |
|
2030. |
Solve : VS 2005 datagrind in web page? |
Answer» I have a web page with a data grind and a search button with a TEXT AREA, once i PASTE some username in the text box and hint search the grind gets populated with the data from DB. |
|
2031. |
Solve : how i can make a network conection? |
Answer» :)how i can MAKE a network conectionyou're going to have to explain more, Quote from: iskandar.zulkarnain91 on February 12, 2008, 11:39:46 PM :)how i can make a network conectionConnect to a network... If you WANT more SPECIFIC HELP you will need to tell us more about your situation. |
|
2032. |
Solve : Java - JTextPane & MS-Word? |
Answer» HI all, How can I load the content of a word document file into a JTextPane. How to USE Document, DefaultStyledDocument, ETC for this PURPOSE? Thanks doLoadCommand() |
|
2033. |
Solve : Learning to code (Python)? |
Answer» Hi guys, |
|
2034. |
Solve : Creating an automated documentation tree? |
Answer» Hey. |
|
2035. |
Solve : C++ pointers? |
Answer» I'm having a hard time comprehending POINTERS.. |
|
2036. |
Solve : Cellphone/ringtone help?? |
Answer» This is not really about computers but more towards programming... |
|
2037. |
Solve : Merging Tab Delimited Data to Excel with VB Script or Macro? |
Answer» Hello, all 3 columns populated A,B, C from 1 through 14 with data of which I have formulas on the Excel page that pick up the 3 values per row of 14 lines in the text file.I guessed that the workbook existed with the formulas. I didn't use any path names for the files, so the script expected ascii.txt, the script, and Book1.xls to be in the same directory. When I said the script wasn't tested, I meant with real data, the script runs without a syntax error....a logic error is another matter. I'm using Excel 2002, but I doubt it's a great leap forward from Excel 2000. Made a few changes to the script, mainly so you can see what's going on in Excel. I strongly urge you to use paths, especially on the SaveAs. I had a helluva time finding the saved workbook. (hint: it was buried in my user directory) Code: [Select]Const ForReading = 1 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("ascii.txt", ForReading) Set xlApp = CreateObject("Excel.Application") xlApp.DisplayAlerts = False xlApp.Visible = True Set xlBook = xlApp.Workbooks.Open("Book1.xls") Set xlSheet = xlBook.Worksheets(1) xlSheet.Activate For row = 1 To 14 strIn = f.ReadLine arrData = Split(strIn, vbTab, -1) xlApp.Cells(row, 1) = arrData(0) xlApp.Cells(row, 2) = arrData(1) xlApp.Cells(row, 3) = arrData(2) Next f.Close xlBook.SaveAs("Book1.xls") 'use a path xlBook.Close xlApp.Quit I have a similar issue as the OP. I need to import a large .txt file into Excel. The data set in the .txt file is delimited by ":". In any given .txt file, there could be up to 70000 individual numbers separated by colons. Excel attempts to import this data set into a single row, thus exceeding the maximum of number of columns that can be created in Excel. What I would like to do is process the data into Excel via a VB script, similar to the OP. I need the data to populate into a single column, thus filling vertical down the column. Can anyone help? Thanks!Please don't hijack other threads. Many times posts get lost and don't receive the attention they deserve. I'm having a hard time visualizing the input file. Is there a single line with 70000 characters occasionally delimited by a colon? If there are multiple lines, does each line end at the delimiter, or does the delimited data wrap lines? Perhaps you could show the first two or three lines of data. Sorry for the hijack Here are a couple of lines of data -3:-3:-3:-3:-2:-2:-2:-2:-2:-2:-1:-1:-1:-1:-1:0:0:0:0:1:1:1:1:1:1:2:2:2:2:2:3:3:3:3:4:4:5:5:5:6:6:6:7: 7:7:7:8:8:8:8:9:9:10:10:11:11:11:11:12:12:13:13:13:14:14:15:15:15:16:16:17:17:18:18:18:19:19: 19:20:21:21:22:22:23:24:24:25:25:25:26:26:27:27:27:28:29:30:30:31:31:32:33:33:34:34:35:35: 36:36:37:38:38:39:40:40:41:41:42:43:43:44:45:46:47:47:47:48:49:50:50:51:52:53:54:55:55:56:57: 58:59:60:60: I don't think that line breaks actually exist in this data stream....it's just a continuous row of numbers separates by colons. I appreciate the help!I got some strange results on some rows, but it may just be the way I cut and pasted your data. Code: [Select]Const ForReading = 1 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("ascii.txt", ForReading) Set xlApp = CreateObject("Excel.Application") xlApp.DisplayAlerts = False Set xlBook = xlApp.Workbooks.Add() Set xlSheet = xlBook.Worksheets(1) xlSheet.Activate row = 0 strIn = f.ReadAll arrData = Split(strIn, ":", -1) For x = 0 To UBound(arrData) row = row + 1 xlApp.Cells(row, 1) = arrData(x) Next f.Close xlApp.Visible = True I didn't write any save code, but you can save the spreadsheet through normal means when it appears. Good luck. That code works great, with one slight problem. I think that I have too many data values to import into a single column in Excel 2003. If I cut the data stream in half, the code imports with no problem. However, if I try to import the entire data file, the code stops with errors. Is there a way for the code to open a new "sheet" once the maximum number of rows is obtained? If not, I make this work. I really appreciate the time and code! I found that Excel 2003 has a maximum of 65,536 rows. Code: [Select]Const ForReading = 1 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("ascii.txt", ForReading) Set xlApp = CreateObject("Excel.Application") xlApp.DisplayAlerts = False Set xlBook = xlApp.Workbooks.Add() maxRows = 65535 row = 0 strIn = f.ReadAll arrData = Split(strIn, ":", -1) For x = 0 To UBound(arrData) If row > maxRows Then row = 0 Set xlSheet = xlBook.Sheets.Add xlSheet.Activate End If row = row + 1 xlApp.Cells(row, 1) = arrData(x) Next f.Close xlApp.Visible = True I used maxRows - 1 in the script. You can play around with this number depending how many entries you need per worksheet. Good luck. Perfect! Thanks for all of the help! |
|
2038. |
Solve : Restore Backup Files?? |
Answer» I have a Toshiba Qosmio that is starting to be naughty. My Trend Antivirus keeps sending me messages about the LATEST installment not working, I cannot open My Documents, though if I access SIMILAR files on the other drive it works. The sound is garbled, and my Media Center dropped recording a program last night. |
|
2039. |
Solve : javascript & C++? |
Answer» How to CALL a module made in c++ from JAVASCRIPT .. For eg suppose I click on a button made of javascript a PROGRAM written in c++ should be called ... PLEASE HELP .. |
|
2040. |
Solve : HTML in IE & FF help? |
Answer» Hello |
|
2041. |
Solve : how do i make a batch file so it will do something when you press a certain key?? |
Answer» I am fairly new at batch and am trying to make a program. i want it so that it will take KEYBOARD commands. I know the pause command, but say I wanted to make it so that i had a hub for all the drives and i pressed F for the F Drive, Q for the Q drive, and so on. how do i do this? |
|
2042. |
Solve : regarding make file? |
Answer» CC = gcc CFLAGS = -g -Wall OS=UNIX ifeq ($(OS),UNIX) TRANSCRIBE_DIR = './transcribe/' SEGMENT_DIR = './segment/' INTERVALS_DIR = './intervals/' QUANTIZE_DIR = './quantize/' SEARCH_DIR = './search/' COMMON_DIR = './common/' MRR_DIR = './mrranalysis/' DBGEN_DIR = './dbgen/' SYNTH_DIR = './synth/' BIN = './bin/' EXE = else TRANSCRIBE_DIR = '.\transcribe\' SEGMENT_DIR = '.\segment\' INTERVALS_DIR = '.\intervals\' QUANTIZE_DIR = '.\quantize\' SEARCH_DIR = '.\search\' COMMON_DIR = '.\common\' MRR_DIR = '.\mrranalysis\' DBGEN_DIR = '.\dbgen\' SYNTH_DIR = '.\synth\' BIN = '.\bin\' EXE = '.exe' endif ################################# LIBRARIES ######################################### # Transcription Module LIBRARY #com : $(CC) $(CFLAGS) -c $(COMMON_DIR)common.c -o $(BIN)common.o libtra : $(CC) $(CFLAGS) -I $(COMMON_DIR) -c $(TRANSCRIBE_DIR)libtra.c -o $(BIN)libtra.o # SEGMENTATION Module Library libseg : $(CC) $(CFLAGS) -I $(COMMON_DIR) -c $(SEGMENT_DIR)libseg.c -o $(BIN)libseg.o # Intervals Module Library libint : $(CC) $(CFLAGS) -I $(COMMON_DIR) -c $(INTERVALS_DIR)libint.c -o $(BIN)libint.o # Quantize Module Library libquant : $(CC) $(CFLAGS) -I $(COMMON_DIR) -c $(QUANTIZE_DIR)libquant.c -o $(BIN)libquant.o # Search Module Library libsearch : $(CC) $(CFLAGS) -I $(COMMON_DIR) -c $(SEARCH_DIR)libsearch.c -o $(BIN)libsearch.o ################################ PROGRAMS ###################################### # type make (module name) from the (base dir). # The executables are copied to (base dir)/bin/ # The output files are placed in (base dir)/out/ #Builind them all at once single: tra seg int qua sea # Transcription Module Executable tra : libtra com $(CC) $(CFLAGS) -I $(COMMON_DIR) $(TRANSCRIBE_DIR)transcribe.c $(BIN)libtra.o $(BIN)common.o -lm -o $(BIN)transcribe$(EXE) # Segmentation Module Executable seg : libseg com $(CC) $(CFLAGS) -I $(COMMON_DIR) $(SEGMENT_DIR)segment.c $(BIN)libseg.o $(BIN)common.o -lm -o $(BIN)segment$(EXE) # Intervals Module Executable int : libint com $(CC) $(CFLAGS) -I $(COMMON_DIR) $(INTERVALS_DIR)intervals.c $(BIN)libint.o $(BIN)common.o -lm -o $(BIN)intervals$(EXE) # Quantize Module Executables qua : libquant com $(CC) $(CFLAGS) -I $(COMMON_DIR) $(QUANTIZE_DIR)quantizequ.c $(BIN)libquant.o $(BIN)common.o -lm -o $(BIN)quantizequ$(EXE) $(CC) $(CFLAGS) -I $(COMMON_DIR) $(QUANTIZE_DIR)quantizedb.c $(BIN)libquant.o $(BIN)common.o -lm -o $(BIN)quantizedb$(EXE) # Search Module Executables sea : libsearch com $(CC) $(CFLAGS) -I $(COMMON_DIR) $(SEARCH_DIR)search.c $(BIN)libsearch.o $(BIN)common.o -lm -o $(BIN)search$(EXE) $(CC) $(CFLAGS) -I $(COMMON_DIR) $(SEARCH_DIR)sort.c $(BIN)common.o -o $(BIN)sort$(EXE) $(CC) $(CFLAGS) -I $(COMMON_DIR) $(SEARCH_DIR)genhtml.c $(BIN)common.o -o $(BIN)genhtml$(EXE) # MRR experimentation module executable mrr : com $(CC) $(CFLAGS) -I $(COMMON_DIR) $(MRR_DIR)findrank.c -o $(BIN)findrank$(EXE) $(CC) $(CFLAGS) -I $(COMMON_DIR) $(MRR_DIR)tansenbatch.c -o $(BIN)tansenbatch$(EXE) $(CC) $(CFLAGS) -I $(COMMON_DIR) $(MRR_DIR)findmrr.c -o $(BIN)findmrr$(EXE) #database generation db : com $(CC) $(CFLAGS) -I $(COMMON_DIR) -I $(TRANSCRIBE_DIR) -I $(SEGMENT_DIR) -I $(INTERVALS_DIR) $(DBGEN_DIR)database.c $(BIN)common.o $(BIN)libtra.o $(BIN)libseg.o $(BIN)libint.o -lm -o $(BIN)database$(EXE) #synthesis for debugging syn : com $(CC) $(CFLAGS) -I $(COMMON_DIR) $(SYNTH_DIR)note2tpe.c $(BIN)common.o -lm -o $(BIN)note2tpe$(EXE) $(CC) $(CFLAGS) $(SYNTH_DIR)synth.c -lm -o $(BIN)synth$(EXE) ########################################################################## What may be the PROBLEM in above make file.? I do write make and press the enter. it comes as: gcc -g -Wall -I './common/' -c './common/'common.c -o './bin/'common.o |
|
2043. |
Solve : how can i move whole directories in batch?? |
Answer» I am trying to make a program that will TAKE the F DRIVE and copy it all to the Q:\batch-files\batch\all. How do i do this?From a COMMAND PROMPT type: XCOPY /? |
|
2044. |
Solve : help me serial port my problem? |
Answer» Can somebody help? Really need help. |
|
2045. |
Solve : Starting on HTML? |
Answer» I have RECENTLY started my Javascript class and we are going over the HTML and XHTML. |
|
2046. |
Solve : run Turbo C in prototype? |
Answer» how can i run programming using Turbo C and connecting my program to a PROTOTYPE? What is this prototype?what is the meaning of the prototype? Please EXPLAIN it in detail. |
|
2047. |
Solve : BAT Files and USB Ports. is it possible?? |
Answer» is there a way to program bat files to work with USB ports? ... The above quoted part reminded me of something I read online. It is not batch file related, nor USB. If those are of key importance, then the link I have in mind is not going to be for you. If controlling devices is the key thing though, you might like to visit and read: http://www.hardwaresecrets.com/article/233 It is interesting. There are 7 pages. It starts out with a simple example. Just LEDs. By the 6th page or so, it shows you how to build and interface to control just about anything. that page is really interesting. i was watching on the discovery channel last christmas. about christmas lights and this guy in florida had a comp controled christmas lights. the page u sent me to actually told me how to do that. Thanks!!!Hello macdad, to start off (if you have not ALREADY) install VB Express or something, then you can easily write input/output procedures. Beyond the LEDs you can play with, you can hookup Stepper Motors that can be harvested from CD drives. There is more fun than just playing with a LPT port. You can hookup an Analog Joystick (BEST a X & Y , 4 button FligthMaster with a Hood Switch) to the Gaming port, and there is where the fun starts. Now you can control the Stepper. All you need is a PCI Sound card. I intercepted the X and Y and Hood Switch and hooked up an Infrared Detector and displayed the received results on the screen. If it works properly it can receive Radio Speaker SIGNALS or display your Heart Beat from your finger via a Laser beam. Caution: The PCI cards this way are easy to fry!! However a used one + Software you can buy for $10. Also PowerSupplies are easily burned out if the Stepper Transistors are not running in the proper sequence. With a bit of searching you can find all the Info on the Internet. Let me know how you are making out. Regards. Quote from: macdad- on January 21, 2008, 06:06:16 PM that page is really interesting. i was watching on the discovery channel last christmas. about christmas lights and this guy in florida had a comp controled christmas lights. the page u sent me to actually told me how to do that. You're very welcome. I'm glad you took time to read it, and that you found it interesting. I did - I suppose that is why I had it bookmarked. I'm glad I did that too, now. Thanks for posting back too. It sounds like it got you to dreaming and thinking. That is a Good Thing. And, it appears that alexK is into that sort of thing too. If you two partner up, be nice to me when you take over the world, ok? Quote from: WillyW on January 19, 2008, 09:54:14 AM Quote from: macdad- on January 19, 2008, 07:53:04 AM... That's a pretty cool IDEA..... All kinds of ideas are popping into my head after reading that. Quote from: alexK on January 21, 2008, 08:01:17 PM You can hookup an Analog Joystick (best a X & Y , 4 button FligthMaster with a Hood Switch) to the Gaming port, and there is where the fun starts.would a PS2 controller work. i have the conecter cable and the controller.macdad- , I started the experiments with an old Joystick that I found in the basement. That one is an Analog with 15 pins. An USB one appears to be Digital, but I am not sure. Searching on the internet I only found projects using the 15 Pin ones. I don't know if all 15 Pin joysticks are Analog. Maybe somebody out there may be able to fill in on that one. To interface the data from the Gaming or LPT Port in VB Express requires DLLs (e.g. InOutput or InOutput 32) that can be downloaded. (VB Express does not support that Interface). To run those projects requires some extensive programming and research on the Internet. The U.K. has quite some selection. thanks for the tip |
|
2048. |
Solve : Can I use a batch file to open a file with a certain extension?? |
Answer» I have a batch file I have set up so when i right click on a folder i have the choice to run it and open a file inside that's always got the same name and extension. This one works fine. |
|
2049. |
Solve : Programming Help in VB 6!! Need 1 tip or 2? |
Answer» If i press the F1 i get "The MSDN collection does not exist. Please reinstall MSDN. i still can't run the prog in eny other prog (like word)I'm not sure where you're going with this but to run this within the Word application you'd need to run it as a macro. VB is an event driven language which makes it perfect for interactive applications. Your program seems to be acting as both a program and a user in that it's creating the events and then running code in response. I know I'm a little slow on the uptake, but I still have no idea what you're trying to accomplish. word was just a EXP i want to run it in 9Dragons a MMORPG tis is what it locks like before i press the F11 Start F11 Stop F10 Skill Slot Time (mS) Passive Skill 1 / 1 / Passive Skill 2 / 2 / Active Skill 1 / 3 / / 2000 / Active Skill 2 / 4 / / 3000 / Times to repeat / 5/ and if the cursor is located at the Times to repetwhen i press F11 it locks like this Times to repeat /5u12/ if i hawe it at the Active Skill 1 it looks like this Active skill 1 /1u12/ so the check If PS1C > -1 And PS1C < 10 Then PS1 = CInt(PS1C.Text) End If seems to work Well i'm going on wecation now so i cant complet it before new year. but i'l bump this later if i need more help So werry christmas and a happy new year.Well i'm back and hawe the same problem. What is does so far. When i press the F11 button it locks fore about 1-3 sek and then it writes u and what i hawe wrutten in the first 2 text boxes then nothing more. What i want it to do. I want to be able to start it in eny program. It wont lock when i press F11.(whrites the u and the first 2 boxes whidout locking) It start writing the 3 and 4 text boxes(like this 3 wait 4 wait 3 wait 4 wait 3 wait 4 wait) The 3 and 4 from the last example can be change to enyting betwene 0 and 9 and the wait can be changed seperatly in the 2 boxes on the right The last box is for how meny times box 3 and 4 SHELL run before the prog press p The F10 button whill stop the loop All this whidout locking the computer betwene the writings.Well i made som changes. Now it writes the 3 and 4 txt box and the p also but it still locks but i can move the mouse betveen the loops and i still can't start it whidout having it marked. i think it can be the SendKeys command or the wait command Code: (vb) [Select]Dim lop As Integer Dim PS1 As Integer Dim PS2 As Integer Dim AS1 As Integer Dim AS2 As Integer Dim AS1a As Integer Dim AS2a As Integer Dim repetetimes As Integer Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Dim bCancel As Boolean Private Sub AS1C_GotFocus() AS1C = "" End Sub Private Sub AS1T_GotFocus() AS1T = "" End Sub Private Sub AS2C_GotFocus() AS2C = "" End Sub Private Sub AS2T_GotFocus() AS2T = "" End Sub Private Sub Form_Load() Me.KeyPreview = True End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) Debug.Print KeyCode, Shift Select Case KeyCode Case vbKeyF11 bCancel = False PS1C.Enabled = False 'So that you dont change it when it runns lop = 1 If PS1C <> "Input" And PS1C <> "" Then PS1 = CInt(PS1C.Text) End If If PS2C <> "Input" And PS2C <> "" Then PS2 = CInt(PS2C.Text) End If If AS1C <> "Input" And PS1C <> "" Then AS1 = CInt(AS1C.Text) End If If AS2C <> "Input" And AS2C <> "" Then AS2 = CInt(AS2C.Text) End If If AS1T <> "Input" And AS1T <> "" Then AS1a = CInt(AS1T.Text) End If If AS2T <> "Input" And AS2T <> "" Then AS2a = CInt(AS2T.Text) End If If repet <> "Input" And repet <> "" And repet > 0 Then repetetimes = CInt(repet.Text) Else MsgBox "You hawe to set more then that", vbInformation End If SendKeys "u" ' press the u key Sleep (500) ' wait for 0,5 sek If PS1C <> "Input" And PS1C <> "" Then 'If the txt box PS1C is not empty then contineu SendKeys PS1 'press the button that is assigned to PS1C ex 1 Sleep (500) ' wait for 0,5 sek End If If PS2C <> "Input" And PS2C <> "" Then 'If the txt box PS2C is not empty then contineu SendKeys PS2 'press the button that is assigned to PS2C ex 2 Sleep (500) ' wait 0,5 sek End If DoEvents Do While Not bCancel 'stop running the prog when press the F10 button Do While lop < repetetimes 'run this part the times specified in the "Times to repet" txt box If AS1C <> "Input" Then SendKeys AS1 'press the button that is assigned to PS1C ex 3 Sleep (AS1a) 'wait for the number in mS assigned in AS1T ex 5000 (5 sek) End If If AS2C <> "Input" Then SendKeys AS2 'press the button that is assigned to PS1C ex 4 Sleep (AS2a) 'wait for the number in mS assigned in AS1T ex 3000 (3 sek) End If lop = lop + 1 DoEvents Loop SendKeys "p" ' press the p key Sleep (10000) 'wait 10 sek lop = 0 ' resett the lop 'Case vbKeyF10 DoEvents 'GoTo start Loop Case vbKeyF10 bCancel = True PS1C.Enabled = True End Select End Sub Private Sub PS1C_GotFocus() PS1C = "" End Sub Private Sub PS2C_GotFocus() PS2C = "" End Sub Private Sub repet_GotFocus() repet = "" End Sub -:Bump:- Still need help-:Bump:- |
|
2050. |
Solve : Batch file to copy TIME as string? |
Answer» Running Windows XP SP2 |
|