Syntax error text in VBA

Why are the following lines of code not highlighted (in red) to indicate a syntax error when they are clearly incorrect:

ActiveSheete.Range("A1").Select

ActiveSheet e.Range("A1").Select

But this one is highlighted:

ActiveSheet e .Range("A1").Select

-- 
R Ormerod
0
ROrmerod (14)
8/4/2004 10:47:02 AM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
362 Views

Similar Articles

[PageSpeed] 34

The first two are not incorrect, as the

-- 

HTH

Bob Phillips
    ... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"R Ormerod" <ROrmerod@discussions.microsoft.com> wrote in message
news:6F4E5969-601C-41F8-BEC2-337AB64C5819@microsoft.com...
> Why are the following lines of code not highlighted (in red) to indicate a
syntax error when they are clearly incorrect:
>
> ActiveSheete.Range("A1").Select
>
> ActiveSheet e.Range("A1").Select
>
> But this one is highlighted:
>
> ActiveSheet e .Range("A1").Select
>
> -- 
> R Ormerod


0
bob.phillips1 (6510)
8/4/2004 12:03:44 PM
The first two are not incorrect as VBA is treating them as variables. If you
had Option Explicit set you would see you get a variable undefined error.

The third is the same but you added a syntax error by having a space before
the ., so it highlights in red.

-- 

HTH

Bob Phillips
    ... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"R Ormerod" <ROrmerod@discussions.microsoft.com> wrote in message
news:6F4E5969-601C-41F8-BEC2-337AB64C5819@microsoft.com...
> Why are the following lines of code not highlighted (in red) to indicate a
syntax error when they are clearly incorrect:
>
> ActiveSheete.Range("A1").Select
>
> ActiveSheet e.Range("A1").Select
>
> But this one is highlighted:
>
> ActiveSheet e .Range("A1").Select
>
> -- 
> R Ormerod


0
bob.phillips1 (6510)
8/4/2004 12:06:36 PM
It will only return an error when you run it because it is only recognised
as an error when VBA tries to resolve the reference - run  time.

-- 

HTH

Bob Phillips
    ... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"R Ormerod" <ROrmerod@discussions.microsoft.com> wrote in message
news:F4E8A826-98AF-4FB8-9A2B-8866D2676A21@microsoft.com...
> I entered the following code at the beginning of the macro but there seems
to be no difference:
>
> Option Explicit
> Dim ActiveSheet
>
> How can I get VBA to declare an error for the first two lines of code
below using this method?
>
> -- 
> R Ormerod
>
>
> "Bob Phillips" wrote:
>
> > The first two are not incorrect as VBA is treating them as variables. If
you
> > had Option Explicit set you would see you get a variable undefined
error.
> >
> > The third is the same but you added a syntax error by having a space
before
> > the ., so it highlights in red.
> >
> > -- 
> >
> > HTH
> >
> > Bob Phillips
> >     ... looking out across Poole Harbour to the Purbecks
> > (remove nothere from the email address if mailing direct)
> >
> > "R Ormerod" <ROrmerod@discussions.microsoft.com> wrote in message
> > news:6F4E5969-601C-41F8-BEC2-337AB64C5819@microsoft.com...
> > > Why are the following lines of code not highlighted (in red) to
indicate a
> > syntax error when they are clearly incorrect:
> > >
> > > ActiveSheete.Range("A1").Select
> > >
> > > ActiveSheet e.Range("A1").Select
> > >
> > > But this one is highlighted:
> > >
> > > ActiveSheet e .Range("A1").Select
> > >
> > > -- 
> > > R Ormerod
> >
> >
> >


0
bob.phillips1 (6510)
8/4/2004 5:08:14 PM
Reply:

Similar Artilces:

Unable to obtain service organization from the adapter error
I=B4m getting the next error when I select the " Dynamics GP econnect" adapter registered into my machine and I click the next Button in the add generated items in VS. I=B4m Working with VS 2005 y Biztalk 2006 --------------------------- Add Adapter Wizard --------------------------- Unable to obtain service organization from the adapter. Value cannot be null. Parameter name: stream --------------------------- OK --------------------------- Any help I would appreciate. Francisco Try the following: To resolve this problem, add the eConnect schema directly to the BizTalk Server...

Exchange Performance error
Hi I have exchange 2003 in my org. I have plenty oof erro on mom server about exchange with this description: (This alert indicates that global catalog issues may be affecting the performance of your Exchange Server environment. The Performance object monitored for this alert is MSExchangeDSAccess Processes-Ldap Search Time-<All>-1.0-minutes (threshold). This alert is generated when the average of the last 10 samples is greater than 50 milliseconds. ) what shoud I do for this error? Many thanks Babak What's your GC to Exchange Server processor ratio? Might be easier to tell ...

get/change error direct deposit
I have a client with multiple companies. One company is receiving the following error when trying to create a cheque batch. " A get /change operation on table "ME-Direct-Deposit-MSTR" failed accessing SQL Data I have been unable to find a solution....any ideas? thx, Doug -- Doug Wilson Great Plains Consultant MCS Canada I looks to me as if one of the EFT products have been installed without initializing the tables.The Direct Deposit Master is allocated to EFT for Payables. If you add an "Other Window" to your shortcuts you can complete the "Payables EF...

Excel Value Error
My formula is =c7*c8 works as long as c7 is not a blank. If made a blank after being a number, then Value error occurs. How do I do properly? Please. Example 1*100=100, blank*100=Value error. -- Jim Finecey Try this: =N(C7)*C8 -- Biff Microsoft Excel MVP "Jim Finecey" <JimFinecey@discussions.microsoft.com> wrote in message news:5A6F5D11-0522-4E3A-A11B-BD34F2686994@microsoft.com... > My formula is =c7*c8 works as long as c7 is not a blank. If made a blank > after being a number, then Value error occurs. How do I do properly? > Please. Example > 1*1...

E-mail error Message #2
Do that mean the problem is on their end or mine. I could not telenet to the ip listed in the original e-mail. Thanks Most likely the problem is on their end. I tried to Telnet to that same IP and it also failed. -- Ben Winzenz Exchange MVP "Michael Moore" <Mike.Moore@sgic.com> wrote in message news:eORWKBViEHA.2664@TK2MSFTNGP11.phx.gbl... > Do that mean the problem is on their end or mine. I could not telenet to > the > ip listed in the original e-mail. Thanks > > ...

UNMOUNTABLE_BOOT_DRIVE error
Hiya! My laptop battery has been dying for quite some time, since I had kept it constantly in my laptop and didn't even realise I was supposed to take it out when using the adaptor until recently. However, my computer had said that it was still capable of recharging, just that the battery life was shortened... and I kinda just ignored it since I was planning on getting a new laptop soon, anyway. To get to the point... today I needed to shift my laptop, so I unplugged the adaptor, thinking that my laptop should still have a little bit of battery left to sustain it- but instea...

RPC server error when trying to run quota message service
I just installed quota message service and when I try to run it I get a message "RPC server unavailable." Any ideas? This "quota message service" is a third-party product? You might ask the supplier of that product. -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" "Algowithm" <Algowithm@discussions.microsoft.com> wrote in message news:19D0D68E-5C21-4FCB-952F-95CEF48FCE2C@microsoft.com... >I just installed quota message service and when I try to run it I get a > message "RPC server unavailable."...

Exchange 2003 error 2112.
I'm running Exchange Enterprise Server 2003 on a Windows 2000 server which has been working in production for about a year. The Active Directory Servers are Windows 2000 SP3 (GC) and the second server is running SP4. I'm getting event ID: 2112, 9186, 9187 which I believe are all directly related to 2112. I ran "policytest.exe" and got the following results: =============================================== Local domain is "domainname.net" (DOMAINNAME) Account is "DOMAINNAME\Exchange Enterprise Servers" ======================== DC = "ADSER...

AsyncReadComplete with error
Hello, I am trying to download a text file from the web. Under XP it works great, but under Vista I get the following error here: Case vbAsyncStatusCodeError CancelAsyncRead AsyncProp.PropertyName RaiseEvent DownloadError(AsyncProp.PropertyName, vbAsyncStatusCodeError, Err.Description & " " & Err.Number) Err.description is: System Error Err.Number is (0x800C0200L/ -2146696704). I bing'ed it and this code means INET_E_RESULT_DISPATCHED. I tried to understand this result to track down what might be going wrong, but...

CRM Wizard Install Error 401 error
When running the CRM install Wizard receive the following error: The Request Failed with HTTP Status 401: Unauthoriized The workstation is on a vpn connection and can access the Web server in port 80 via IE, but not servername:5555 The workstation is in the same domain as the CRM server Thanks Joseph W wrote: > When running the CRM install Wizard receive the following error: > The Request Failed with HTTP Status 401: Unauthoriized > > The workstation is on a vpn connection and can access the Web server in port > 80 via IE, but not servername:5555 Which kind of 401 error ...

error in equation 'decimal places currency footer'
I got the error message: " error in equation 'decimal places currency footer' " when I try to run the Trial balance report, does any one know what might be the problem? is it because some fields in the report were not set up correctly? any help will be greately appreciated. It means that someone modified the report, somehow that field or equation got changed. Sometimes this can happen when the person modifying the report deletes fields off the report that are used in calculations. If this is in fact a modified report, my suggestion would be to delete it and start fro...

error fowarding email
At times I get an error message when I try to foward an email that has an attachment with it. ...

Exchange 5.5 DS/IS Sync error
I've been tidying up a number of problems in our Exchange environment. We are part way through a migration from NT4/Exch5.5 to Win2k/AD/Exch2k. I am not going to consider Win2003 or Exchange 2003 until I've got a clean migration completed from NT4 / Exch5.5 to Win2k / AD / Exch2k. I've described our environment in full at the bottom of this message. Problem - There are 6 Public Folders for which I see the following error on the Exch5.5 application log, every 15 minutes. (In the error text below, I've replaced our site/company specific names with "generic" names.)...

Outlook 2007 error event id: 35
Per hour i receive about 12'000 of these errors in the event viewer on my vista laptop. And usualy my outlook at some point just goes into the "not responding" mode. Then I have to kill the process from the task manager to be able to reopen outlook just to see it freeze again after a couple of seconds. I tried the whole stop indexing service and reinstall index service procedure to no avail. Does anyone else have a solution to this very anoying problem? Fred putzhilfe@gmail.com <putzhilfe@gmail.com> wrote: > Per hour i receive about 12'000 of these errors in the...

Money 2005 error message
I use Money 2005 and recently when I click on "Connect to Bank" and the updating process starts, I receive the following message - "You cannot perform this operation right now. There is an online operation in progress - try again later." I can then click on "OK" at the bottom of this message and the updating will continue and doesn't appear to be affected by this action. I do not have anything else going on - I have even closed Windows Messager and that makes no difference. I would like to stop this from happening - any suggestions will be apprecia...

Syntax for testing the value of a boolean in integration manager
Hi All I'm imnporting customers to GP10 with IM and I want to set the address ID of the billing address based on a bit field in my DB. I have a field called "InvoiceAddress" which has a user-defined name (e.g. "Billing") I want to put a script on the Bill To Address filed, that checks if the InvoiceAddress field is true. If it is, it sets the address id to the the user defined name (e.g. Billing). I can't figure out how to test if the bit field is true. I've tried: If SourceFields(ImportSource.InvoiceAddress) = True Then .... End if Also tried = -1 = '...

File lock error
Hello all, We have users that work on MS Publisher 2003 documents on a shared folder. We keep getting an error when multiple users try to access the same file. The error is a file lock error. My question is this - Can MS publisher documents be shared so that multiple users can work on them ?? The NOS is Novell netware 6.5 Sp5. All clients are windows XP. thanks for any help in advance, Martin Reyes LHRIC ...

Reinstall of CRM error
I have uninstalled CRM server 1.2 and am now trying to reinstall using the existing databases. I choose the option "use exisiting databases" but get this error during setup: "setup was unable to upgrade the microsoft crm databases failed to run script:00 - create mscr,.sql hresult:80040e14 unkown error (80040e14)". I have read other posts that contain this error but they are trying to install a clean installation of CRM (i.e. database files still exisit). I also only have one Domain Controller. Why is setup trying to run a script that creates new databases when I hav...

Error message 07-24-10
Any suggestions with error message 553. Verizon is my ISP On Sat, 24 Jul 2010 14:37:07 -0700, Scott <Scott@discussions.microsoft.com> wrote: >Any suggestions with error message 553. Verizon is my ISP What's the full exact error? http://office.microsoft.com/en-us/outlook-help/troubleshoot-550-553-and-relay-prohibited-errors-HA001112833.aspx Has some generic tips on error 553. -- To reply via e-mail, remove The Obvious and .invalid from my e-mail address. ...

Syntax to check protected status of a worksheet?
I've used ActiveWorkbook.ProtectStructure to return a True/False value indicating that a workbook is password protected. Does similar syntax exist for the active sheet? I have tried a number of variations but can't find it, and for some reason (reason conversion to XL 2003?) I don't get those popup windows that suggest my next choice of code words. Any ideas? Thanks. You can protect a few different things on a worksheet. Dim wks as worksheet set wks = activesheet If wks.ProtectContents _ Or wks.ProtectDrawingObjects _ Or wks.Prote...

Error Code 646 11-18-09
While performing windows updates, error code 646 encountered and frequently crashes the internet explorer and Mozila Firefox in the middle of web browsing. Please help me. "Chimi" <Chimi@discussions.microsoft.com> wrote in message news:0D035A3F-C150-4EDD-B071-81F5BCCB1E08@microsoft.com... > While performing windows updates, error code 646 encountered and > frequently > crashes the internet explorer and Mozila Firefox in the middle of web > browsing. > > Please help me. What version of Windows and Internet Explorer do you have? However, ...

Publisher 2003 "accent" text box
Color schemes specify "accent" colors, but how does one specify the "accent" for a new text box, once a color scheme has been selected? Experiment with the custom color schemes. I don't think you can specify different accent colors for each and every text box. When you open the fill menu, the color scheme colors are displayed above the other choices, when you hover your cursor above the colors it will display the accent numbers. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "PeterO" <PeterO@...

Runtime Error When Closing Outlook
When i close Micrsoft Outlook 2000, I receive the following error: Microsoft Visual C++ Runtime Library (Path to Outlook.exe) Abnormal Program Termination. I tried to turn off the Exchang Scan in the Add-In Manager. What else can I do? I am getting the same error that Linda has described. This just started two weeks ago. I have tried reinstalling Outlook twice without success. Does anyone have a solution to this annoying problem? ...

when writing an IF statement what is the syntax for "Not Equal to.
If statement for greater than would be =IF(B12>0,B12) What would it be for NOT EQUAL to ? one way: =IF(B12<>0,B12) which will return FALSE if B12 = 0 In article <2A4F6074-C4A9-4617-8D8E-A4C011B35B6E@microsoft.com>, "NEEDTOKNOW" <NEEDTOKNOW@discussions.microsoft.com> wrote: > If statement for greater than would be =IF(B12>0,B12) > > What would it be for NOT EQUAL to ? ...

Vertical text printing solid bar in chart
I have a chart created in Excel that has alpha-numeric text vertically for labeling the x-axis. This chart has been copied into a Word document and in viewing appearance as intended, but in printing text coming out as solid rectangles. When printing this chart from Excel, all is well and appears as intended. Am hoping this is a problem similarly encountered by others and easily corrected. Think I may have solved this problem on my own . . . one of the problems may have been in the way the chart is pasted from Excel to Word. As I didn't originate either the report or the cha...