PC Review


Reply
Thread Tools Rate Thread

Disable UserForm Objects

 
 
Sean Connery via OfficeKB.com
Guest
Posts: n/a
 
      11th Nov 2006
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 With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      11th Nov 2006
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform Objects =?Utf-8?B?S2F2YWw=?= Microsoft Excel Programming 2 22nd Aug 2008 10:38 AM
Create Userform Objects PaulW Microsoft Excel Programming 1 27th Feb 2008 02:15 PM
Number of UserForm Control Objects =?Utf-8?B?SVRfcm9vZmVy?= Microsoft Excel Programming 14 12th Jun 2007 08:36 PM
Creating and controlling objects in a UserForm Pierre Archambault Microsoft Excel Programming 1 24th Nov 2004 03:37 PM
Can you Copy Objects from a Worksheet to a Userform Dave Baranas Microsoft Excel Programming 0 14th Aug 2003 07:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:17 PM.