Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Carole Walker   on Mar 26 In MS Office Category.

  
Question Answered By: Brock Smith   on Mar 26

Bit short on time at the mo... But for now....

Option Explicit
Tells the IDE that you have to declare variables explicitly.
If you leave this out it's possible to just use any variable anywhere. This
means that if you type in a variable name wrongly VBA will instantiate a
variable with that name.

The compile option  doesn't "compile" in the sense that other languages
compile so there is no build complete message because there is no build.
What it does is attempt to create p-code and put it into place in the file.
This process checks variables and references for example.

Try putting Option Explicit at the top of the module and then "compiling".

I'll look at your code a little closer later ... Sorry for the rush!!

You'll find a discussion of p-code at
www.programmersheaven.com/.../vbvm.htm

You're probably getting the 1004 because the code doesn't know where
rangeText is.

What variable types are you are passing?

> I'm pretty new to this VBA stuff, so please forgive some of
> my queries.
Don't be daft... You are more than welcome in this group with any questions!

Share: 

 

This Question has 8 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Excel VBA Errors on Saving Workbook Or get search suggestion and latest updates.


Tagged: