PC Review


Reply
Thread Tools Rate Thread

CommandButton State

 
 
=?Utf-8?B?TWF0cyBTYW1zb24=?=
Guest
Posts: n/a
 
      7th Nov 2006
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 With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      7th Nov 2006
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" <(E-Mail Removed)> wrote in message
news:691D8B33-2E80-4BCC-B881-(E-Mail Removed)...
> 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 With Quote
 
=?Utf-8?B?TWF0cyBTYW1zb24=?=
Guest
Posts: n/a
 
      7th Nov 2006
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" <(E-Mail Removed)> wrote in message
> news:691D8B33-2E80-4BCC-B881-(E-Mail Removed)...
> > 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 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
State table lookup - How can I display full state name only on data entry? mthornblad@gmail.com Microsoft Access Forms 1 30th Aug 2007 05:29 PM
how do I create a form that selects a state & then only show that state's cities bayouplayer Microsoft Access Form Coding 1 28th Apr 2006 03:06 AM
Memento to store current state, not just bookmarked state? Samuel R. Neff Microsoft C# .NET 3 2nd Apr 2005 08:06 AM
Asus notebook resumes from standby state to power on state by itself tinke Windows XP General 1 5th Feb 2005 01:17 AM
Save state and restore state of ASPxGrid Accross pages James Wansley Microsoft C# .NET 1 20th Oct 2003 06:07 PM


Features
 

Advertising
 

Newsgroups
 


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