vba error
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA error

VBA error

resolvedResolved · High Priority · Version 2003

replyReply Sun 25 Jan 2009, 15:14Delegate John said...

John has attended:
Excel VBA Intro Intermediate course

VBA error

I received the error"Compile error:Expected:Identifier" when try to create a procedure. The error appeared when hit enter after typing Sub.

For upcoming training course dates see: Pricing & availability

replyReply Wed 11 Feb 2009, 14:31Trainer Carlos said...

Compile error:Expected:Identifier

Hi John

When creating a procedure you have to give the procedure a name.

By pressing Enter immediately after writing Sub causes the "Compile error:Expected:Identifier" error because you haven't named the Procedure.

If you enter

Sub MacroName

and then press enter.

You will create a procedure with no problems unless you already have a procedure in the module with the same name

Carlos

replyReply Wed 11 Feb 2009, 20:35Delegate John said...

RE: Compile error:Expected:Identifier

Thanks Carlos. I was doing VBA for the first time after few attempts I have already figured it. Many thanks for answering this question

 

Please browse our web site to find out more about
excel-courses and other Microsoft training courses.

Excel tip:

Turn Function tooltips on and off

Excel 2002 (XP) and Excel 2003 have the Function tooltips facility. When you type in a function name followed by a bracket, for example, =IF(, a yellow box appears beside the function name and lists the function's arguments. This is very useful when you can't quite remember the order of a function's arguments or what the arguments actually are!

However, Function tooltips can become annoying. To turn them off, choose Tools|Options. and select the General tab. Then, untick the Function tooltips box and choose OK.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard