I read it a few times and I think I know what he is trying to say but not sure if I know how to give him the correct answer.
Seems to be saying that he has some ComboBoxes and DriveListBoxes on a form and he wants to send the user selected value to a variable to use in a batch file.
As close as I can get is:
Dim ValueCboBox as String (or what ever you need)
Dim ValueDriveListBox as String (or what ever you need)
ValueCboBox = cboBox.text
I don't think you have to worry about the DriveListBox though. Then again I really don't know, I'm still learning myself. Every day above ground is a GOOD DAY!!!
I guess what I'm asking in simplest form is how would I take what someone filled into a text box, or chose in a combo box or whatever it might be and put that info into a file.
If the settings are specific to a machine or account user, then look into the SaveSetting and GetSetting functions. This will save the settings directly into the system registry and you don't have to worry about doing any file maintenance.
Whenever I think of "settings" or "options", I think that this is the best route to take. It's quick and easy. Neil Konitzer, President
Freisoft
Thank You all for your help on that, I got that figured out, but now I have another matter that has come into view. This is what I have for writing the batch file...
Dim Sdrvbat As String
Sdrvbat = FreeFile
Open "C:\Sdrv.bat" For Output As #Sdrvbat
Print #Sdrvbat, "SET %DRV=" + drvSoftware.Drive
Close Sdrvbat
When I look at the Sdrv.bat file this is what's in it:
SET %DRV=c: [LOCAL]
It spits out the drive letter, a colon, and the drive name. My question would be how do I get it to send out just the drive letter without a colon or the drive name??
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.