VB's Equivalent For "continue" ??
Here's a very elementary question, to which I do not have an answer.
What is VB's equivalent for C's "continue" ?
( For those who are not familiar with C, let me tell you what "continue" does.
"continue" is used to re-route the control back to the first statement in a loop. )
So, is this possible in VB, without having to resort to GoTo ??
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
- "continue" And "break" Keywords ???
- "SendMouse" Equivalent For "SendKeys"?
- If I Use "SaveSetting App.Title, "Settings", "Font", "001122"" - Save Date In The Registry, Where Ca
- File Not Found : "C:windowssystem32ieframe.dll1"-- Continue Loading Project?
- File Not Found : "C:windowssystem32ieframe.dll1"-- Continue Loading Project?
- Continue Asking The Experts About "displaying Results From A Crosstab Query "
- Check "FileExists" Before Continue With Procedure.
- What Is The Adodc Equivalent Of "data1.recordset.edit" ?
- Convert Letter To VbKey Equivalent ("a" > VbKeyA)
- SQL Server Equivalent Of "SELECT ... FROM DUAL" ** Resolved **
- Equivalent Of '" && Text1.text && "' For An Integer?
- Equivalent Of "typdef TYPE Varname" In VB ?
- Problem With The "Continue Do" Statement. Help!
- Solution> Error: """"&&H8007007E (-2147024770) The Specified Module Cannot Be Found"""
- VB-equivalent To "server.urlencode"
- Is There A Code Equivalent To "End Task" ??
- Method "SaveAs" Or "Save" Of Object "Excel.Workbook" Does Not Work.
- "Setup Cannot Continue Because ......"
- "Continue" Does Not Work!
- Header + "Continue"
- Using "continue" Command Like In C / C++
- How To Replace "Apple" With "Banana" In A String That Contains "Orange" In A TXT File
- Data1.RecordSource = "select * From Salary Where 姓名 Like " + S + " " * ""
- How To Change Boolean Field From Displaying "0" And "-1" To "Yes" And "No"
- ADO Equivalent Of DAO "nomatch"
- Help With Equivalent C++ "->" Command
- What Is VB Equivalent Of QB "Out &&H3BC, 255" .
- Any Equivalent Of "CPtrList" In VB?
- Extract Local Names For "OK", "Cancel" And "Apply"
- <input Type="submit" Name="op-savefile" Value="Save"> - How To S
- Disabling "wake Up", "sleep" && "power" Button
- Pleez, Read This!!! Matter Important! "Printing In "DOS Mode" Using "Shell" -not Happening, I Wonder
- "Setup Cannot Continue Because Some System Files Are Out Of Date On Your System"
- Getting The File "Type" Descriptions (i.e., "doc" = "Microsoft Word Docume
- Changing The "title" Of A VB Created Word Doc From "Document1" 2 "BadgerBai
- Resubmitting: "BeginTrans" , "CommitTrans" And "Rollback With Data Environments
- Can Someone Guide Me On How To "PUT" A "CHECKBOX" Inside A "Datagrid" For VB6.0?
- Combobox Help """""""""""""'Urgent"""""""&&quo
- "BeginTrans" , "CommitTrans" And "Rollback With Data Environments
- "continue" In Vb6?
- May I "continue"?
Export Table From MS Access To Outlooks Contacts "Standard Field" - With Conatct Item "Notes"
- Inverted Commas In String "etc" && Variable && """
- Creating Program "item" In Existing Start Menu "group"
- How To Change All Cells Format Type From "General" To "Text" Using VB Code
- How To Reach Each File In A Folder In Order? With "FileSystemObject" - "Files" Class.
- Emulating The "APPLY" Button Within The Appearance Options "Refresh The New Settings"
- Msgbox "text", VbOKOnly, "Title" Remove X In Upper Right Corner
- A Stupid Problem: "Error Accessing The System Registry" ("Solved") Thank You
"continue" And "break" Keywords ???
What's the equivalent of C++'s "continue" and "break" keywords in VBScript?
Here's a sample of what I mean:
while value > 0
if bSomething then
"SendMouse" Equivalent For "SendKeys"?
VB has a powerful command called "SendKeys" where by you can emulate keyboard strokes in code.
But I need a way to simulate a mouse click in code. Something along the lines of a "SendMouse" command.
Any ideas, anyone?
Continue Asking The Experts About "displaying Results From A Crosstab Query "
It's great to find the topic "displaying results from a crosstab query" posted sometime ago. It can solve the problem with crosstab query that I stucked on quite a long time. But I still have one more problem: How about a crosstab query with parameters? SQL experts, please help
Thanks a lot in advance,
Check "FileExists" Before Continue With Procedure.
My program needs to extract Data from a text file, how can I check that the file "C:Myfile.txt" exists using a control button click before running the rest of the Procedure within the control.
If the File exists ( I want to continue with the procedure )
If not ( I wish to end the Procedure and show a different Form - telling the user the file does not exist etc. )
Can you please help.
Convert Letter To VbKey Equivalent ("a" > VbKeyA)
I am using PostMessage API to send text to a certain program.
I've got my program to work when I use
PostMessage hWnd1, WM_KEYDOWN, vbKeyA, 0
But I need to send a string that will be defined at runtime, so I need a way to do something like
PostMessage hWnd1, WM_KEYDOWN, "something", 0
but that code doesn't work.
I need to send a long value of each letter so I need to know how to convert a letter to its vbKey equivalent
Problem With The "Continue Do" Statement. Help!
My Do...Loop Until works fine until I've added the "Continue Do" statement.
I've got a Syntax Error message box. Apparently, cannot run it.
The code is created as an excel macro. Could someone tell me what is wrong. Thanks!
ArraySerialNumber = InputBox("ENTER ARRAY SERIAL NUMBER (0004, 0013, etc... Then press ENTER on the keyboard or Click OK)", "ARRAY SERIAL NUMBER INPUT", "XXXX")
If ArraySerialNumber = "" Then
If ArraySerialNumber = "XXXX" Then
Response = MsgBox("NOT A VALID ARRAY SERIAL NUMBER. PLEASE RETRY", vbRetryCancel + vbExclamation + vbCritical, _
If Response = vbCancel Then
If Len(ArraySerialNumber) <> 4 Then
Response = MsgBox("ONLY 4 DIGITS ALLOW. PLEASE RETRY", vbRetryCancel + vbExclamation + vbCritical, _
If Response = vbCancel Then
Loop Until Len(ArraySerialNumber) = 4
VB-equivalent To "server.urlencode"
I am searching for an VB6-equivalent to ASP "server.urlencode"
what do I want to do?
I read out a string which contains special characters like "ë" and make a XML-string out of it. Then I want to load the string into a XMLDOMDoc40 and send it to a different database via ServerXMLHTTP40
Everything works fine with normal ASCII-text.
I already tried a lot of string parsing or working with a different encoding like
strResponseText = "<?xml version=""1.0"" encoding=""utf-7""?> "
strResponseText = strResponseText & vbNewLine & HttpReq.responseText
Is There A Code Equivalent To "End Task" ??
I need to be able to close a program that has to be closed by using "End Task." (I do not know why this is .. it just is).
I know the handle and the caption of the window.
Does anyone know how to do this.
Method "SaveAs" Or "Save" Of Object "Excel.Workbook" Does Not Work.
I did for a long time a program that uses excel automation, so that from a template will create a final file with some data pulled from the database (with ADO). At the end and when the Excel file is ready to be saved I got in a couple of computers some problems. In the whole LAN have XP, but in these 2 computers we have SP2. I have checked the rights and are OK (I have even tried to save the Workbook under the Temp folder and also the same problem).
Working with Office 2003 (SP1).
I have searched in internet about any bugs but I don´t find anything.
Thanks for your time
"Setup Cannot Continue Because ......"
I'm using VB 6 and Access db. I've created my 1st application, created a package and tried to install it on another pc.
During the installation on the target pc, it says:
"Setup cannot continue because some system files are out of date on your system. Click OK if you would like setup to update these files for you now. You will need to restart Windows before you can run steup again. Click Cancel to exit setup without updating system files."
It keeps giving the error eventhough I choose OK and reboot. Weird.
The Bootstrap files no. 3-7 are causing this error :
File1=@Vb6stkit.dll,$(WinSysPathSysFile),,,3/26/99 1:00:00 AM,101888,184.108.40.206
File2=@COMCAT.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,5/31/98 12:00:00 AM,22288,4.71.1460.1
File3=@STDOLE2.TLB,$(WinSysPathSysFile),$(TLBRegister),,1/13/03 2:49:54 PM,16896,2.40.4518.0
File4=@ASYCFILT.DLL,$(WinSysPathSysFile),,,8/31/99 4:55:18 PM,147728,2.40.4277.1
File5=@OLEPRO32.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,1/13/03 2:49:54 PM,229376,5.0.4518.0
File6=@OLEAUT32.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,1/13/03 2:49:54 PM,929792,2.40.4518.0
File7=@MSVBVM60.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,2/23/04 8:42:40 PM,1386496,220.127.116.11
If I remove 3-7, I get pass the installation, but upon running the program, I get an error, " The data binding DLL, 'VB5DB.DLL' could not be loaded." Probably caused by the removal of the above bootstrap lines.
Any thots will be appreciated on how I can solve the problem.
"Continue" Does Not Work!
Hello VB community,
I am trained in C++, and my current research requires me to do some VBA. Great, I am done with my little code, but I cannot get "continue" to work. I am pasting the loop in here, and my problem is in red characters. VB says: COMPILE ERROR: EXPECTED: EXPRESSION. And it highlights Continue For in red.
So, as you can see, if errorFlag1st and errorFlag2nd are TRUE, I do not want the counters to increment and I want to go the the next iteration, and try it out with a new random number. To do that, isn't "continue" the right command?
Please help! I am losing it!
Do While int500Counter < 500
For int100Counter = 0 To int100Counter = 100
tempRandValue = Int((lUpperBound - lLowerBound + 1) * Rnd + lLowerBound) 'generates a random value
Write #130, tempRandValue
'**FIRST CHECK: is tempRandValue found in DA field?
Do While Not EOF(120) 'loops until end-of-file reached
Input #120, testValue1
'if matching value is found, then exit loop, errorFlag1st remains FALSE
If testValue1 = tempRandValue Then
errorFlag1st = True
'**SECOND CHECK: has tempRandValue already occured within 2nd nested loop?
If errorFlag1st = False Then 'this loop will only execute if tempRandValue passes first integrity check
Do While Not EOF(130)
Input #130, testValue2
If tempRandValue = testValue2 Then
errorFlag2nd = True
If errorFlag1st = True Or errorFlag2nd = True Then
'so, if tempRandValue does not pass either of the two integrity checks, this loop (int100counter)
'will CONTINUE (that is, skip this iteration without incrementing any counters)
Write #200, tempRandValue 'once again, this will only be done if tempRandValue passes both integrity checks
int100Counter = int100Counter + 1
int100Counter = 0
int500Counter = int500Counter + 1
Header + "Continue"
The report is broken down by header and footer for each:
The detail section is hidden, and each header has totals for QTY and VALUE.
However, here is an example for the month of April:
11225 25 $25.00
12351 30 $125.00
12252 100 $522.00
253585 2005 $1,256.95
16459 22 $80,025.00
1254687 10 $154,125.00
April totals: xxxxx xxxxxx
What I would like to do is for page2 to have the month header read April Continued
Is there anyway to do this? I have tried putting a text box "recordcount" with control source =1 in a variety of places and =iif([recordcount]>1,"Continued","") beside [Month] in the month header. However, since each line total is its own header it record count never goes above 1.
What I am thinking is that there needs to be away to write:
If this is the first time the month is used, do nothing, else if the current month does not appear in its footer on the previous page "Contined".
I would think this would be simple, but it is driving me crazy.
Thank you for any and all help,
Using "continue" Command Like In C / C++
in a for loop :
for i=1 to 10
if i=3 then continue ' *****
i want to do something like the continue in other languages
is this possible?
thnaks in adbvance
Israel - the best place to live in after heaven, but no one want's to go there so fast.
How To Change Boolean Field From Displaying "0" And "-1" To "Yes" And "No"
I have a data report, which displays a few fields from an Access table, one which is a boolean. At the moment if the boolean value is True, then on the data report it displays "-1", and if False "0".
How can I change this so it displays "Yes" if true and "No" if False?
Would be really grateful for any help.
ADO Equivalent Of DAO "nomatch"
In DAO, vb6, there is a property called "nomatch" to see if a record already exists. Does anyone know how to do this in ADO?
What Is VB Equivalent Of QB "Out &&H3BC, 255" .
I have been using Quick Basic to send commands to controller boards that I have installed in my PC. A typical Quick Basic command might be: Out &H3BC, 255. You probably know that this "Out" command writes the binary equivalent of "255" at memory address &H3BC.
Does anyone know an equivalent command in Visual Basic?
Edited by Greb1 on 02-27-2000 at 08:22 PM
Any Equivalent Of "CPtrList" In VB?
I want to make a linked-list of user Classes. Something like "CPtrList" in VC. I know that "Collections" doesn't work, because it only groups together controls under a common heading. Unlike "CPtrlist" I want to add the classes, not their addresses. Is there any Control for what I have in mind? (The classes are of the same type, but just have different data in them).
Extract Local Names For "OK", "Cancel" And "Apply"
I noticed that some programs written in C++ have an English language, but the captions of the buttons "OK", "Cancel" and "Apply" are in German, Swedish or whatever localized Windows version the user utilizes. Any idea how to obtain the captions of those buttons in VB? The only method which comes into my mind is to get the locale ID and have an array with strings for the the various language versions, but I doubt that those programs do it in that way.
Pleez, Read This!!! Matter Important! "Printing In "DOS Mode" Using "Shell" -not Happening, I Wonder
[I had to repost it since I have not received any replies for my earlier post]
I have a problem.
Following is the code :
Shell("c:windowscommand.com /c type " & App.path & "matrix.txt >prn")
where App.path is C:XYZ
when the above line is executed, the contents of "matrix.txt" is not printed on the printer. Instead, control just passes on to the next line.
So, to find out why, I modified the line thus.
The above command takes me to the "command prompt". Here, when I give the command "type c:xyzmatrix.txt >prn", which is what the vbcode does, I get the message "file creation error".
So, I have identified the problem. Can anyone tell me why this "File creation error" occurs, And how to solve the problem?
Thanks for reading through.
"Setup Cannot Continue Because Some System Files Are Out Of Date On Your System"
I've created an install program with the package & deployment wizard that ships with vb6. When i try to intall my program on windows 2000 (can't really say if it is just windows 2000 at this point) I get the error:
"Setup cannot continue because some system files are out of date on your system. Click OK if you would like setup to update these files for you now. You will need to re-start windows before you can run setup again. CLick cancel to exit setup without updating these files."
It seems no matter how many times I click ok and re-start the system, the message continues to pop up and wont let me install the program. Any suggestions?
Also, when i do successfully get the install to work on certain machines, it displays:
"An error occured while trying to register the file "C:windowssystem32msado25.tlb"
Getting The File "Type" Descriptions (i.e., "doc" = "Microsoft Word Docume
I am creating an Explorer-type Listview to display the files in a directory, and one piece of info I need to know how to obtain is the file "type" (i.e., "doc" = "Mircosoft Word Document", "xls" = "Microsoft Excel Worksheet", etc.). Is there an API, or does anyone have a technique to do this? Thanks.
Changing The "title" Of A VB Created Word Doc From "Document1" 2 "BadgerBai
Ok, when I create a new word doc it automatically takes on the name "DocumentX", where X is a number greater than 1.
What I want to do is change this by using something like:
Dim objWoof As New Word.ApplicationDim objGrowl As Word.Document Set objGrowl = objWoof.Documents.Add objGrowl.[What Property] = "Badger Baiters R Us"
Is this possible?
Oh, and b4 anyone mentions it, I do NOT want to save it, that is NOT an option...just getting that out the way now
Resubmitting: "BeginTrans" , "CommitTrans" And "Rollback With Data Environments
----- Original Message -----
From: shankar [ babu ]
Sent: Wednesday, February 26, 2003 12:24 PM
Subject: "BeginTrans" , "CommitTrans" and "Rollback with dataenvironments
I am using data enviroment designer in my project.
I am getting error while using
"BeginTrans" , "CommitTrans" and "Rollback"
of the DataEnvironment 's connection properties
kindly let me know the solution
thanks in advance
Combobox Help """""""""""""'Urgent"""""""&&quo
This may be the stupid way.But i need this.................
I am using combobox in my form. I set the style to Dropdown combo.
Here we can exter text in combobox b'coz of the style Dropdown combo.
But i don't want to allow user to enter ......allowed only to select.....
For that i can set the style to Dropdownlist.
But i don't want this style. B'coz i can't clear the text at run time.
Tell me if dropdown combo means, User shouldn't enter at runtime
Tell me if dropdown list means, how to clear the text at runtime...
Pls help me out.....Urgent
"continue" In Vb6?
is there a way to continue the llop in vb6
like we do in c++
i know theres a way of doing that in vb2005
but i want to know if that is possible in slightly older version
im using vb6
May I "continue"?
Here's yet another easy question from a VB novice. In VB what's the equivalent of the "continue" statement used in C++?
Inverted Commas In String "etc" && Variable && """
I need to include a double inverted comma in a string, here's some more detail...
MsgTitle = "RaceControl 2003"
MsgText = "Enter password."
rcvarValueString1 = InputBox(MsgText, MsgTitle)
rcvarValueString2 = "MS Access;PWD=" & rcvarValueString1 & """
Set dbRacecontrol = OpenDatabase("RaceControl2003.mdb", False, False, rcvarValueString1)
The last part of the Set statement needs to read "MSAccess;PWD=password" including the double inverted commas (where password is the password for the database). However, I want to make the user type in the password... I suppose what i've done so far is correct, but I don't know how to include the double inverted commas in the variable rcvarValueString2. The rest of the Set statement is definitely correct.
Thanks in advance,
Creating Program "item" In Existing Start Menu "group"
I'm finally at the stage of packaging my application for distibution here at work. When it installs, I don't want it to create a new group in the start menu rather I want to ADD it to an existing group. All of our essential programs go in to a group called "Desktop Applications". During the P&DW, I created a new Group under Programs called "Desktop Applications" and put the program item under that group thinking it would recognize it as an existing group and just add it. Well, apparently I did something wrong because it doesn't add it to this group, nor does it add it anywere else.
Does anyone know how to do this?
How To Change All Cells Format Type From "General" To "Text" Using VB Code
I am new to VBA. If you see my code below, it gets the name from user to insert a new sheet into existing work book. Now, when I create this new worksheet, I want to change their all cells format from "General" to "Text". In that case, whatever I add it is saved as "text" not number or general.
How can I do that? Please help me.
On Error Resume Next
Dim count As Integer
If txtNewSheet.Text <> "" Then
' Get the sheet with the name selected in the Sheet combo box.
Set shtFavorites = wbDpiFavorites.Sheets.Item(1)
shtFavorites.Name = txtNewSheet.Text
cmbSheet.ListIndex = cmbSheet.ListCount - 1
Set shtFavorites = Nothing
How To Reach Each File In A Folder In Order? With "FileSystemObject" - "Files" Class.
I know that I can reach any file(or filename) by using FileBox control with
'I can choose any file with its index. The Files are sorted by their names
I want to do the same without using FileBox control, else I tried to reach Files
Dim fso As New FileSystemObject, fil1 As File, fol1 As Folder, fc As Files
Set fc = fso.GetFolder(sFolderPath).Files
'Nothing wrong up to here
'but this line gives error
I figured it out that
Msgbox fc(index) 'is wrong
Msgbox fc(key) 'this is the right one
So what is key here?
And Is it possible to reach each file with in order(as sorted by names)
(ex: I want to access the 6. file or 3. file) with FileSystem Object?
Ofcourse any other ideas will be wellcome.
Emulating The "APPLY" Button Within The Appearance Options "Refresh The New Settings"
I'm needing some help with this one. I've got a copy of the HKCUControl Panel hive and need to apply this to the registry and then "apply" the changes. The problem lies with "refreshing" the registry so that the changes apply.
Here's an example:
1. Open Regedit and change the following key = HKCUControl PanelColorsBackground to 0 0 0 (black, or any choice of color!) and close regedit.
2. To apply the changes, a user needs to log off and then back in. This is no good.
I've tried running TSKILL explorer.exe but this does not help either..
Any help would be great.
A Stupid Problem: "Error Accessing The System Registry" ("Solved") Thank You
This is a very silly problem. I tried to have a look of References from Project dropdown menu, it returned a critical error:
"Error Accessing the system registry".
I reinstalled VB6 but it seems that the problem still exists. Anybody please tell me how to solve the problem.
thanks in advance
Edited by - kenyiwei on 5/6/2004 2:07:51 AM