Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default userform and variable

gary - i'd be interested in the answer to this, too, because when i
change the name of a userform to something like frmGenerate, i can't
get the initialization to run..........
but i didn't think of declaring it as a variable in my global
declarations module.........
susan

Gary Keramidas wrote:
anyway to set a userform name to a variable i can use with <variable name
instead of with userform1, with userform2, etc?

--


Gary


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default userform and variable

If you have

Private Sub frmGenerate_Initialize()

then that is the problem. No matter the userform name, it should always be

Private Sub Userform_Initialize()


--
Regards,
Tom Ogilvy


"Susan" wrote in message
ps.com...
gary - i'd be interested in the answer to this, too, because when i
change the name of a userform to something like frmGenerate, i can't
get the initialization to run..........
but i didn't think of declaring it as a variable in my global
declarations module.........
susan

Gary Keramidas wrote:
anyway to set a userform name to a variable i can use with <variable
name
instead of with userform1, with userform2, etc?

--


Gary




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default userform and variable

tom - yes, that's what i have to do. but if you have a macro where
you're calling various userforms from the main macro, it would be nice
to be able to differentiate them more easily, even tho i know the
initialize sub is directly connected to that specific userform......
when i've got five different userform windows open it gets a little
confusing LOL
susan

Tom Ogilvy wrote:
If you have

Private Sub frmGenerate_Initialize()

then that is the problem. No matter the userform name, it should always be

Private Sub Userform_Initialize()


--
Regards,
Tom Ogilvy


"Susan" wrote in message
ps.com...
gary - i'd be interested in the answer to this, too, because when i
change the name of a userform to something like frmGenerate, i can't
get the initialization to run..........
but i didn't think of declaring it as a variable in my global
declarations module.........
susan

Gary Keramidas wrote:
anyway to set a userform name to a variable i can use with <variable
name
instead of with userform1, with userform2, etc?

--


Gary



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default userform and variable

then you seem to be asking the same question as Gary, so the answer is the
same

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
"Susan" wrote in message
ups.com...
tom - yes, that's what i have to do. but if you have a macro where
you're calling various userforms from the main macro, it would be nice
to be able to differentiate them more easily, even tho i know the
initialize sub is directly connected to that specific userform......
when i've got five different userform windows open it gets a little
confusing LOL
susan

Tom Ogilvy wrote:
If you have

Private Sub frmGenerate_Initialize()

then that is the problem. No matter the userform name, it should always
be

Private Sub Userform_Initialize()


--
Regards,
Tom Ogilvy


"Susan" wrote in message
ps.com...
gary - i'd be interested in the answer to this, too, because when i
change the name of a userform to something like frmGenerate, i can't
get the initialization to run..........
but i didn't think of declaring it as a variable in my global
declarations module.........
susan

Gary Keramidas wrote:
anyway to set a userform name to a variable i can use with <variable
name
instead of with userform1, with userform2, etc?

--


Gary




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 and variable Jeff Excel Discussion (Misc queries) 1 March 16th 07 03:14 PM
preserving variable from userform Gary Keramidas Excel Programming 3 October 28th 06 04:44 AM
VBA Variable as userform [email protected] Excel Programming 3 April 13th 06 08:32 PM
Variable ComboBox on Userform DHallam Excel Programming 2 July 19th 05 12:20 PM
Passing a value to a variable from Userform Neal Steiner Excel Programming 1 July 18th 03 09:12 PM


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