Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Displaying a Userform

Hi, sorry if this is an obvious question but I can't work it out.

I've created a userform that wants displaying on a worksheet as
default, how do I make it display?

I don't want it to appear when the user presses a button or anything,
it just needs to be on the sheet all the time.

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Displaying a Userform

I think it might work if you enter the userform.show(false) command in
the workbook, open module.

In VBA go to the project explorer and double click on the 'this
workbook', when the module opens, click on the drop boxes at the top
and change them to read workbook an open, repectively.

Enter the text NAMEOFMYUSERFORM.show(false) in this place.

Everytime the workbook opens, this code runs,

the (false) bit means that you can click on other things, such as
cells or other features without closing your form first.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Displaying a Userform

Thanks, I'm now getting an error when I load the workbook:

"Compile Error:

Wrong number of arguments or invalid property assignment."

The line "Private Sub Workbook_Open()" is highlighted when I click OK,
this line was automatically added by Excel when I entered the line you
asked me to try.

Here's the code:

Private Sub Workbook_Open()
UserForm1.Show (False)
End Sub

The above code is displayed with the dropdowns showing as Workbook and
Open, there's no "Read Workbook" or "Open Macro" options, I'm using
Excel 97 if that makes a difference.

Thanks again!


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Displaying a Userform


Private Sub Workbook_Open()
Userform1.Show
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"David" wrote in message
ps.com...
Hi, sorry if this is an obvious question but I can't work it out.

I've created a userform that wants displaying on a worksheet as
default, how do I make it display?

I don't want it to appear when the user presses a button or anything,
it just needs to be on the sheet all the time.

Thanks.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Displaying a Userform


Thanks both of you it's now working!

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 for displaying values from a row Gert-Jan Excel Programming 14 April 26th 06 02:26 PM
Userform for displaying values from a row jgmiddel Excel Discussion (Misc queries) 0 April 25th 06 09:00 PM
Displaying one userform from another CFD[_2_] Excel Programming 5 October 6th 05 06:18 AM
PROBLEM DISPLAYING USERFORM [email protected] Excel Programming 1 May 9th 05 01:11 PM
displaying picture in a userform Todd Huttenstine[_3_] Excel Programming 1 January 28th 04 02:42 AM


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