LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting Public Variables Error


I'm brand new at VB, so my problem-solving abilties are rather
limited...

I have 4 public variables that I have defined in the "Declarations"
area of Module1. Within Module1, I have a bunch of macros that use
these public variables. The 4 variables could be considered
"constant", in that I don't want them to change from macro to macro.

The error I get is "Compile Error - invalid outside procedure", and it
shows up when I try to set the first public variable. My public
variable code is below. Any help is greatly appreciated...
_____________________________________
Public iRange As Range
Public QU, PS, PM As Worksheet

Set QU = Sheets("Questionnaire")
Set PS = Sheets("Process Summary")
Set PM = Sheets("Process Methodology")
Set iRange = PS.Range("A6:T26")
_____________________________________


--
clmarquez
------------------------------------------------------------------------
clmarquez's Profile: http://www.excelforum.com/member.php...o&userid=29386
View this thread: http://www.excelforum.com/showthread...hreadid=501145

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
public variables johnny Excel Discussion (Misc queries) 7 February 27th 08 03:44 PM
Public variables johnny Excel Discussion (Misc queries) 2 February 24th 08 05:05 AM
Public Variables Jerry McNabb Excel Discussion (Misc queries) 0 February 24th 08 01:26 AM
Public Variables ExcelMonkey[_190_] Excel Programming 5 February 21st 05 10:12 AM
Public Variables Les Gordon Excel Programming 2 November 11th 04 12:29 PM


All times are GMT +1. The time now is 10:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"