Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Linking labels to cells and turning off events in userform


Hi all of you,

2 Questions:

I want to show the contents of a particular cell in a label on th
userform. How do I do it? Is it possible to link the caption to th
cell so that if the cell changes, the label will change too?

Also I do some intialisation of scrollbars during th
userform_initialise. But I don't want the scrollbar_change event to ru
during initialisation. Is there a way to switch off the events in th
userform and enable them again at the end of the initialisatio
routine? (Purely for speeding up the code). Any work arounds?

Thanks a lot. You guys are great!


Regards,
Ra

--
routera
-----------------------------------------------------------------------
routeram's Profile: http://www.excelforum.com/member.php...fo&userid=1045
View this thread: http://www.excelforum.com/showthread.php?threadid=27793

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Linking labels to cells and turning off events in userform


for the first:
lable1.caption = Worksheets("Sheet1").Range("A1"

--
mangesh_yada

-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=27793

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Linking labels to cells and turning off events in userform

Hi Routeram,

Also I do some intialisation of scrollbars during the
userform_initialise. But I don't want the scrollbar_change event to run
during initialisation. Is there a way to switch off the events in the
userform and enable them again at the end of the initialisation
routine? (Purely for speeding up the code). Any work arounds?


You have to do it yourself, generally using a module-level variable:

Dim mbNoEvents As Boolean

Private Sub Userform_Initialize()

mbNoEvents = True

'Do your stuff

mbNoEvents = False
End Sub

Private Sub ScrollBar1_Change()

If mbNoEvents Then Exit Sub

'Do your stuff

End Sub

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk


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
Linking chart data labels to cells whose contents change Del Cotter Charts and Charting in Excel 2 June 17th 07 06:07 PM
UserForm events R Avery Excel Programming 5 August 19th 04 05:59 PM
unload userform from within one of that form's beforeupdate events? Andrew H[_3_] Excel Programming 1 August 10th 04 09:07 AM
IeTimer events not working in modeless Userform? Ed[_18_] Excel Programming 0 August 3rd 04 04:21 PM
UserForm Events Nigel[_6_] Excel Programming 1 February 22nd 04 12:19 PM


All times are GMT +1. The time now is 04:29 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"