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

I have a Userform where some Commandbuttons are made Visible=False during the
process. But when I want to preview my underlying document I have to Hide the
Userform. After closing the Preview and returning to the Userform, the
CommandButtons becomes visible again.
Is there any neat way to check the state of the buttons before the preview
and return to that state when the Userform is displayed again? I can of
course go through button by button and set a variable and go through it again
and reset to initial state when redisplaying the Userform, but it seems to be
a dull and sluggish solution.

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

They should be hidden when shown later.

Are you sure you hide it and show it, not Unload and Load?

--
HTH

Bob Phillips

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

"Mats Samson" wrote in message
...
I have a Userform where some Commandbuttons are made Visible=False during

the
process. But when I want to preview my underlying document I have to Hide

the
Userform. After closing the Preview and returning to the Userform, the
CommandButtons becomes visible again.
Is there any neat way to check the state of the buttons before the preview
and return to that state when the Userform is displayed again? I can of
course go through button by button and set a variable and go through it

again
and reset to initial state when redisplaying the Userform, but it seems to

be
a dull and sluggish solution.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default CommandButton State

No Bob, it's only Hidden but I think I found the fault.
The Visible=False instruction was issued in another and Private procedure
and most probably it didn't retain the values when the Userform was hidden
and shown again.
It works though doing other stuff like changing page in the multipage form
and back again.
Thanks anyway

"Bob Phillips" wrote:

They should be hidden when shown later.

Are you sure you hide it and show it, not Unload and Load?

--
HTH

Bob Phillips

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

"Mats Samson" wrote in message
...
I have a Userform where some Commandbuttons are made Visible=False during

the
process. But when I want to preview my underlying document I have to Hide

the
Userform. After closing the Preview and returning to the Userform, the
CommandButtons becomes visible again.
Is there any neat way to check the state of the buttons before the preview
and return to that state when the Userform is displayed again? I can of
course go through button by button and set a variable and go through it

again
and reset to initial state when redisplaying the Userform, but it seems to

be
a dull and sluggish solution.




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
replace state names with state code abbreviations se7098 Excel Worksheet Functions 3 July 25th 09 06:41 PM
How can I show state-by-state data (as silos) on a map of NA Rob Charts and Charting in Excel 0 November 5th 07 03:41 PM
Converting State Names to State Abbreviations aznate Excel Discussion (Misc queries) 1 October 20th 06 06:52 AM
how to get commandbutton name Sean Excel Programming 2 October 17th 06 08:49 AM
CommandButton Alvin Hansen[_2_] Excel Programming 3 August 16th 04 06:35 PM


All times are GMT +1. The time now is 09:48 PM.

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"