Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 542
Default Boolean Variable Definition

Hi, Quick question here, I hope
how do I keep a boolean variable = true and keep that value for every sub or
function that might use it? im having problems when going from one
sub/function to another. The variable keeps getting reset to = "Empty". Do i
actually have to pass it from function to function? What if its used in a
sub? or am i missing something? Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Boolean Variable Definition

Hi


Declare it as Public


Public MyVar As Boolean
Sub mysub()
MyVar = True
End Sub

Mike

"James" wrote:

Hi, Quick question here, I hope
how do I keep a boolean variable = true and keep that value for every sub or
function that might use it? im having problems when going from one
sub/function to another. The variable keeps getting reset to = "Empty". Do i
actually have to pass it from function to function? What if its used in a
sub? or am i missing something? Thanks

Reply
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
VBA variable definition help needed. jenn k New Users to Excel 4 September 5th 08 08:55 PM
Excel question with variable definition Yong Kim Excel Programming 2 March 4th 05 05:47 PM
[variable] definition Veena Excel Programming 3 August 19th 04 01:23 PM
variable range definition jmp Excel Programming 2 May 6th 04 11:06 PM
UserForm not passing Boolean variable Chip Pearson Excel Programming 2 July 19th 03 06:06 PM


All times are GMT +1. The time now is 09:24 PM.

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

About Us

"It's about Microsoft Excel"