LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Leo Leo is offline
external usenet poster
 
Posts: 2
Default Pass value variable to worksheet event

Hello, can anyone help me with the following.

I have a module in vba in which I give a certain boolean the value True. It is a public variable with the name blnStop (Public blnStop as boolean).
If the value is True then the code under the worksheet_change should not work:



Private Sub Worksheet_Change(ByVal Target As Excel.Range)

If blnstop = True Then Exit Sub

If Target.Column = 7 Or Target.colums = 14 Then ......

End Sub

Somehow the value of the boolean blnstop (which is True) is not passed to this event.
In this event the boolean has the value False.

Can anyone help me with this please.
What am I doing wrong?
 
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
pass variable from one workbook to another calebjill Excel Discussion (Misc queries) 2 January 28th 09 07:38 PM
How do I pass a value from an event back to my VBA Programming enviornment. Mac Lingo Excel Programming 2 September 21st 08 09:10 PM
Pass a variable to a different sub RyanH Excel Programming 3 March 14th 08 11:27 PM
Pass a Variable from one sub to another sub RyanH Excel Programming 4 March 14th 08 08:20 PM
Pass Variable to another Sub CSUS_CE_Student[_2_] Excel Programming 5 February 27th 08 01:24 AM


All times are GMT +1. The time now is 09:49 AM.

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"