View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Excel VBA help to test the activecell.value

As you are new to VBA, you still have time to learn good practices and
unlearn bad ones. Try to avoid GoTo statements, and instead structure your
code with conditional statements (e.g., the If statement) and/or by calling
other procedures. GoTo in nearly universally avoided by professional
programmers.


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)




"Marie" wrote in message
...
I am new to VBA macro's and can not get the following test to work
Range("I4").Select
If ActiveCell.Value = "W" Then GoTo WVEnumber
If ActiveCell.Value = "G" Then GoTo BIGnumber
If ActiveCell.Value = "F" Then GoTo BIFnumber

The Macro branches to WVEnumber - no matter what is in the cell "I4" - can
anyone help?