#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Userforms

Hi
how do i show a userform uponopening an excel workbook? Can it be done?
Regards
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Userforms


Two ways I know of:

'no prompt will appear about enabling macros
Sub auto_open()
UserForm1.Show
End Sub

'a prompt will appear
Private Sub Workbook_Open()
UserForm1.Show
End Sub

Rgds
J



On Oct 23, 1:35 pm, Zaahir wrote:
Hi
how do i show a userform uponopening an excel workbook? Can it be done?
Regards


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Userforms

Private Sub Workbook_Open()
Userform1.show
End sub

this is the workbook open event and is fired when the workbook is opened.
It must be located in the thisworkbook module

See Chip Pearson's page on events for an overview if your are not familiar:

http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy


"Zaahir" wrote:

Hi
how do i show a userform uponopening an excel workbook? Can it be done?
Regards

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Userforms

That is incorrect.
Either one would cause a prompt for enabling macros if either caused a
prompt.

--
Regards,
Tom Ogilvy

"WhytheQ" wrote:


Two ways I know of:

'no prompt will appear about enabling macros
Sub auto_open()
UserForm1.Show
End Sub

'a prompt will appear
Private Sub Workbook_Open()
UserForm1.Show
End Sub

Rgds
J



On Oct 23, 1:35 pm, Zaahir wrote:
Hi
how do i show a userform uponopening an excel workbook? Can it be done?
Regards



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Userforms

Quite right Tom: I should have tested that before putting finger to
keyboard.
(Was that the case in earlier versions of Excel? How do you get a macro
to fire without a prompt?)

Regards
J

On Oct 23, 2:23 pm, Tom Ogilvy
wrote:
That is incorrect.
Either one would cause a prompt for enabling macros if either caused a
prompt.

--
Regards,
Tom Ogilvy



"WhytheQ" wrote:

Two ways I know of:


'no prompt will appear about enabling macros
Sub auto_open()
UserForm1.Show
End Sub


'a prompt will appear
Private Sub Workbook_Open()
UserForm1.Show
End Sub


Rgds
J


On Oct 23, 1:35 pm, Zaahir wrote:
Hi
how do i show a userform uponopening an excel workbook? Can it be done?
Regards- Hide quoted text -- Show quoted text -


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
userforms [email protected] Excel Programming 1 February 28th 05 05:29 PM
userforms [email protected] Excel Programming 0 February 16th 05 06:48 PM
Userforms Paul Clark Excel Programming 2 January 17th 04 04:51 PM
Userforms Gary[_8_] Excel Programming 1 August 18th 03 03:26 PM
Userforms Henry[_4_] Excel Programming 0 August 9th 03 11:37 PM


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