answersLogoWhite

0


Best Answer

Sorry That doesn't make much sense I am running a program in VB6 and the code is Option Explicit

Dim msg As String

Dim dlgdef As String

Dim Caption As String

Private Sub cmdOK_Click()

If txtusername.Text = Master Then

If txtpassword.Text = M4573r5hip Then

Load (frmadmin.frm)

Else

msg = "Incorrect Password"

dlgdef = "vbOKOnly"

Caption = "Incorrect Password"

MsgBox(msg, dlgdef, caption)

End If

Else

msg = "Incorrect Username"

dlgdef = "VbOKOnly"

Caption = "Incorrect Username"

MsgBox(msg, dlgdef, caption)

End Sub

When I finish typing in the MsgBox command and click awayI get the error

Compile Error:

Expected: =

What is wrong with the code that I makes it give me this error from?

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why do you get the error in VB6 Compile error Expected then an equals sign on this code MsgBoxmsg buttons title PS I already defined the variables msg buttons and title and they are in brackets?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Is declaration of variables allocated memory?

Constants, static variables and global variables are allocated in the program's data segment at compile time. Local variables are allocated on the stack at runtime. Variables cannot be allocated on the heap, you must use a constant, static variable, global variable or local variable to store the start address of a dynamic memory allocation. The variable must be a raw pointer or a reference handle (a smart pointer).


Can a processs BSS segment grow during program execution?

No. The size of the data segment (which includes the BSS) is determined at compile time and cannot change at runtime. The data segment stores all the program's constants, global variables and static variables, the total size of which can be determined at compile time and is therefore fixed at that point. BSS is an abbreviation of Block Start by Symbol and is used specifically to allocate all global and static variables that are either in an uninitialised state or are explicitly initialised to zero. Global and static variables initialised with non-zero values are allocated separately from the BSS, as are all the constants.


What is a good sentence for compile?

Example sentence - I will compile the details for the report once I have all of the facts.


Is memory allocated at runtime for the static variables?

No. Static memory is allocated at compile time. Static variables are allocated within the program's data segment which is a physical part of the executable. When you load the executable into memory, the operating system sets aside enough memory for the entire executable and copies it, byte for byte, into that memory. So when the program is executed, the data segment is already allocated.


Difference between dynamic and static memory allocation?

Static memory allocation is memory allocated on the "stack" and cannot be resized after the initial allocation, while dynamic memory allocation is memory allocated in the "heap", and can be dynamically expanded and shrunk as necessary.

Related questions

What is dynamic binding in java?

Dynamic Binding means declaring variables at run time only rather than declaring it at compile time.


How do you make software from a simple java program?

You compile it.You compile it.You compile it.You compile it.


What is constant variable in c?

Constant variables refers to those variables whose values cannot be changed. These variables should be initialized along with their declaration. Attempt to change the value of a constant variable will generate compile error. The syntax for declaring a constant variable is:const data-type variableName = value;


Is declaration of variables allocated memory?

Constants, static variables and global variables are allocated in the program's data segment at compile time. Local variables are allocated on the stack at runtime. Variables cannot be allocated on the heap, you must use a constant, static variable, global variable or local variable to store the start address of a dynamic memory allocation. The variable must be a raw pointer or a reference handle (a smart pointer).


Can a processs BSS segment grow during program execution?

No. The size of the data segment (which includes the BSS) is determined at compile time and cannot change at runtime. The data segment stores all the program's constants, global variables and static variables, the total size of which can be determined at compile time and is therefore fixed at that point. BSS is an abbreviation of Block Start by Symbol and is used specifically to allocate all global and static variables that are either in an uninitialised state or are explicitly initialised to zero. Global and static variables initialised with non-zero values are allocated separately from the BSS, as are all the constants.


How computer handle semantic error?

Semantic error are logical errors. That does mean, it would compile and run without errors. But, the output would be different from the expected output.


What is an antonym for the word compile?

The noun forms for the verb to compile are compiler, compilation, and the gerund, compiling.


What is the present participle of compile?

Compiling is the present participle of compile.


When did Compile - publisher - end?

Compile - publisher - ended in 2002.


When was Compile - publisher - created?

Compile - publisher - was created in 1983.


When was Compile Heart created?

Compile Heart was created in 2006.


Is overriding done at compile time or run time?

compile time