Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default User form/ to show please wait

Any help please?

I want to add into a macro a userform or something so that when the macro is
started a little notice appears saying "Please Wait" or something and stays
on for the duration of the macro and then closes automatically at the end of
the macro? when i try putting in a show aznd then a hide it opens and waits
for a response, any help please,

Many thanks,

Andy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default User form/ to show please wait

Make it non modal

Userform1.show vbModeless
--
Regards,
Tom Ogilvy

"Momo" wrote in message
...
Any help please?

I want to add into a macro a userform or something so that when the macro

is
started a little notice appears saying "Please Wait" or something and

stays
on for the duration of the macro and then closes automatically at the end

of
the macro? when i try putting in a show aznd then a hide it opens and

waits
for a response, any help please,

Many thanks,

Andy



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default User form/ to show please wait

A simpler method, but effective is to show an empty area of the sheet with a
message in a cell while the macro runs.

Sub Wait()
ActiveSheet.Range("DN10").Value = "Please Wait..."
Range("DN9").Activate
Application.ScreenUpdating = False
'Your routine Here
Range("DN10").Clear
Application.ScreenUpdating = True
Range("A1").Select
End Sub

Mike F

"Momo" wrote in message
...
Any help please?

I want to add into a macro a userform or something so that when the macro
is
started a little notice appears saying "Please Wait" or something and
stays
on for the duration of the macro and then closes automatically at the end
of
the macro? when i try putting in a show aznd then a hide it opens and
waits
for a response, any help please,

Many thanks,

Andy



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default User form/ to show please wait

Thanks tom, this seems to work, just one thing, how do i get the userform to
then close once the macro has finished?

Thanks

andy


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default User form/ to show please wait

Tom, I have now got it to close at the end of the macro, just wondering if
there is any way of removing the close option when the window pops up, the
little x in the corner,

thanks

Andy




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default User form/ to show please wait

Unload Userform1 at the end of your code

--
Regards,
Tom Ogilvy

"Momo" wrote in message
...
Thanks tom, this seems to work, just one thing, how do i get the userform

to
then close once the macro has finished?

Thanks

andy




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default User form/ to show please wait

Use the queryclose event to cancel the attempt.

http://support.microsoft.com/default...b;en-us;213713
XL2000: Preventing UserForm from Being Dismissed with Close Button

works with all versions of excel that support userforms.

--
Regards,
Tom Ogilvy



"Momo" wrote in message
...
Tom, I have now got it to close at the end of the macro, just wondering if
there is any way of removing the close option when the window pops up, the
little x in the corner,

thanks

Andy




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default User form/ to show please wait

I put userform1.hide at the end, is that the way to do it? it got rid of it
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default User form/ to show please wait

I would suggest unloading it:

Unload Userform1 at the end of your code

--
Regards,
Tom Ogilvy

--
Regards,
Tom Ogilvy

"Momo" wrote in message
...
I put userform1.hide at the end, is that the way to do it? it got rid of

it


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default User form/ to show please wait

Tom,

one last thing,

when i now run my macro the user form appears, but the label which i have
written the text appears as a white empty box, is this because of the
vbmodeless?
if so am i better just to write what i want as the title of the form?

thanks,

Andy


  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default User form/ to show please wait

Userform1.show vbModeless
doevents

.. . .

Unload Userform1

--
Regards,
Tom Ogilvy



"Momo" <
wrote in message
...
Tom,

one last thing,

when i now run my macro the user form appears, but the label which i have
written the text appears as a white empty box, is this because of the
vbmodeless?
if so am i better just to write what i want as the title of the form?

thanks,

Andy



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
show user form Joanne Links and Linking in Excel 1 February 27th 08 07:52 AM
SHow user form when opening workbook Wanna Learn Excel Discussion (Misc queries) 2 June 26th 07 06:30 PM
User Form Doesn't Show When Tab is Added novicevbaer[_3_] Excel Programming 1 August 12th 04 08:44 AM
Show user form PCOR Excel Programming 1 December 31st 03 12:15 AM
Only Show User Form Once cornishbloke[_8_] Excel Programming 4 December 29th 03 01:24 PM


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

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"