 |
|
|
|
| Author |
Message |
SmartRoss
Joined: 04 Oct 2007 Posts: 2
|
Posted: Sat May 19, 2007 3:36 pm Post subject: HELP!! Then syntax error? |
|
|
In Visual Basic 2005 Express I am programming a web browser. In my coding I
have put in an 'if...end if' block that goes like this:
If TextBox1 = < Then
WebBrowser1.GoBack()
End If
In the error box, it tells me that there is an error with the syntax of the
'then'. It says in the box 'Expression Expected', and I don't know how to
deal with it. Every time I try to use an 'if' command it tells me that it is
expecting an expression.
Please HELP!!
Archived from group: microsoft>public>vb>syntax |
|
| Back to top |
|
 |
"Rick Rothstein \
Joined: 04 Oct 2007 Posts: 1584
|
Posted: Sat May 19, 2007 6:49 pm Post subject: Re: HELP!! Then syntax error? |
|
|
> In Visual Basic 2005 Express I am programming a web browser. In my coding
> I
> have put in an 'if...end if' block that goes like this:
>
> If TextBox1 = < Then
> WebBrowser1.GoBack()
> End If
>
> In the error box, it tells me that there is an error with the syntax of
> the
> 'then'. It says in the box 'Expression Expected', and I don't know how to
> deal with it. Every time I try to use an 'if' command it tells me that it
> is
> expecting an expression.
You need to have something **after** the '=<' comparative operators... you
have TextBox1 is less than or equal to >? Also, if TextBox1 is a
TextBox control, you need to specify a property (probably the Text
property)... an Object cannot be less than or equal to anything... the Text
property, as a String, can be (but, again, you have to show what that
something is).
Now... for future reference... you are in the wrong newsgroup.
Almost everybody in this newsgroup is using VB6 or lower (this is the case
for all newsgroups with ".vb." in the name). While you may get a stray
answer to VB.NET (including VB2003, VB2005 and VB Express which have dropped
..NET from their names) questions here, you should ask them in newsgroups
devoted exclusively to .NET programming (the languages are different enough
to warrant separate newsgroup support). Look for newsgroups with either the
word "dotnet" or "vsnet" in their name.
For the microsoft news server (msnews.microsoft.com), try these newsgroups
for Visual Basic .NET related questions...
microsoft.public.dotnet.languages.vb
microsoft.public.dotnet.languages.vb.upgrade
microsoft.public.dotnet.languages.vb.controls
microsoft.public.dotnet.languages.vb.data
And these for more general .NET questions
microsoft.public.dotnet.general
microsoft.public.vsnet.general
Note: There are many other .NET newgroups (use the first three "fields" from
the last two as templates when searching for them), but the above ones
should get you started.
Rick |
|
| Back to top |
|
 |
SmartRoss
Joined: 04 Oct 2007 Posts: 2
|
Posted: Sun May 20, 2007 5:26 am Post subject: Re: HELP!! Then syntax error? |
|
|
"Rick Rothstein (MVP - VB)" wrote:
> > In Visual Basic 2005 Express I am programming a web browser. In my coding
> > I
> > have put in an 'if...end if' block that goes like this:
> >
> > If TextBox1 = < Then
> > WebBrowser1.GoBack()
> > End If
> >
> > In the error box, it tells me that there is an error with the syntax of
> > the
> > 'then'. It says in the box 'Expression Expected', and I don't know how to
> > deal with it. Every time I try to use an 'if' command it tells me that it
> > is
> > expecting an expression.
>
> You need to have something **after** the '=<' comparative operators... you
> have TextBox1 is less than or equal to >? Also, if TextBox1 is a
> TextBox control, you need to specify a property (probably the Text
> property)... an Object cannot be less than or equal to anything... the Text
> property, as a String, can be (but, again, you have to show what that
> something is).
>
> Now... for future reference... you are in the wrong newsgroup.
>
> Almost everybody in this newsgroup is using VB6 or lower (this is the case
> for all newsgroups with ".vb." in the name). While you may get a stray
> answer to VB.NET (including VB2003, VB2005 and VB Express which have dropped
> ..NET from their names) questions here, you should ask them in newsgroups
> devoted exclusively to .NET programming (the languages are different enough
> to warrant separate newsgroup support). Look for newsgroups with either the
> word "dotnet" or "vsnet" in their name.
>
> For the microsoft news server (msnews.microsoft.com), try these newsgroups
> for Visual Basic .NET related questions...
>
> microsoft.public.dotnet.languages.vb
> microsoft.public.dotnet.languages.vb.upgrade
> microsoft.public.dotnet.languages.vb.controls
> microsoft.public.dotnet.languages.vb.data
>
> And these for more general .NET questions
>
> microsoft.public.dotnet.general
> microsoft.public.vsnet.general
>
> Note: There are many other .NET newgroups (use the first three "fields" from
> the last two as templates when searching for them), but the above ones
> should get you started.
>
> Rick
>
>
Thanks for the note Rick. I will go to the .NET newsgroups in future.
|
|
| Back to top |
|
 |
|
|
| Related Topics: | Syntax Error Hi When I run this function I get the correct answers, unless myStop = 0. I have tried to rectify this without success, can you help please. Function Dim pos, myStop As Integer Dim myHold, myHold1, myHold2, myHold3 As String txtTrackName
Invalid Syntax Error Hello. I have been getting an error that says, Invalid Syntax Error. This message is located on the blue bar on the top of the internet explorer window. I have installed a newer version of internet explorer (IE7) but this problem has not been fixed. T
command line option syntax error.Type Command /? for help when I run any programme setup down loaded from message " command line option syntax error.Type Command /? for help" appears.How to fix this?
syntax to run a .exe I'm new to VB and am writing a small program in VB6 to copy a copy a few files and to run a .exe that installs snap shot viewer. My question is what is the vb command to run the .exe Thanks
VB syntax for this...? Hi. Any idea how I 'un-NET' this to VB (and without using FSO!): Dim buf() As Byte Dim ret As Boolean Dim size As Integer size = 7000 Dim fnum As Integer Dim foo As Object ret = size) ReDim buf(size) |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|