Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disable UserForm Objects

I have been making use of UserForms to enter information into an Excel
spreadsheet. Sometimes, when raising the forms it is necessary to enter
information into some of the objects on the UserForms. Unfortunately, this
activates some of the macros relevant to these objects, which I would
initially prefer not to do. Is it possible to disable the macros on
UserForms, in much the same way as event procedures can be disabled in
Worksheet objects?

If anyone can help, please respond. Thank you.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200611/1

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Disable UserForm Objects

Thi is a technique I use to stop re-entry into an event


Private fEnabled As Boolean

Private Sub TextBox1_Change()
If fEnabled Then
fEnabled = False
'do your stuff
fEnabled = True
End If
End Sub

Private Sub UserForm_Initialize()
fEnabled = True
End Sub

You can use it by adding to those controls tou want tro disabole, and set
fEnabled to false.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Sean Connery via OfficeKB.com" <u5428@uwe wrote in message
news:6922ec02ab2f6@uwe...
I have been making use of UserForms to enter information into an Excel
spreadsheet. Sometimes, when raising the forms it is necessary to enter
information into some of the objects on the UserForms. Unfortunately,

this
activates some of the macros relevant to these objects, which I would
initially prefer not to do. Is it possible to disable the macros on
UserForms, in much the same way as event procedures can be disabled in
Worksheet objects?

If anyone can help, please respond. Thank you.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200611/1



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
Userform Objects Kaval Excel Programming 2 August 22nd 08 10:38 AM
using macros to disable excel objects. bunmi Excel Programming 0 May 11th 05 06:00 PM
Creating and controlling objects in a UserForm Stephen Knapp Excel Programming 0 November 24th 04 03:37 PM
Apply vba code to multiple userform objects sjoopie[_2_] Excel Programming 2 November 5th 04 01:42 PM
Can you Copy Objects from a Worksheet to a Userform Dave Baranas Excel Programming 0 August 14th 03 07:48 PM


All times are GMT +1. The time now is 03:21 AM.

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"