#1   Report Post  
Carol
 
Posts: n/a
Default VBA in Excel

I want to create a template in Excel, such that when you open it, a dialog
box will pop up asking for Customer Name, etc. and once you fill in those
fields and click "Ok," then the fields in the worksheet will then be
populated with that information. I have done this in MS Word using bookmarks,
but I'm not sure how to do it in Excel. Can anyone help me? Many Thanks!
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Debra Dalgleish has a get started with userforms at:
http://www.contextures.com/xlUserForm01.html

Debra has a section to run the userform from a button:
http://www.contextures.com/xlUserForm01.html#Open

But you'll want to use a macro that runs each time you open that workbook:

Option Explicit
sub auto_open()
userform1.show
end sub

is one way.

Carol wrote:

I want to create a template in Excel, such that when you open it, a dialog
box will pop up asking for Customer Name, etc. and once you fill in those
fields and click "Ok," then the fields in the worksheet will then be
populated with that information. I have done this in MS Word using bookmarks,
but I'm not sure how to do it in Excel. Can anyone help me? Many Thanks!


--

Dave Peterson
  #3   Report Post  
Jonathan Cooper
 
Posts: n/a
Default

In A1:E1 type the following:

Customer Name Street Address City State Zip

Go to Tools--Macro--record new macro in this workbook.

Move your cursor down one cell or something and then hit the stop button.
This is just my simple way to create the VBA module in this workbook.

Now hit Alt+F11. This will open VBA. Find the macro you just created and
paste over top of it with the following.

Sub Auto_Open()
'
' Auto_Open Macro
'
ActiveSheet.ShowDataForm
End Sub

Save and close the workbook. Open the workbook again, and you should get
prompted.




"Carol" wrote:

I want to create a template in Excel, such that when you open it, a dialog
box will pop up asking for Customer Name, etc. and once you fill in those
fields and click "Ok," then the fields in the worksheet will then be
populated with that information. I have done this in MS Word using bookmarks,
but I'm not sure how to do it in Excel. Can anyone help me? Many Thanks!

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
html to excel nellie Excel Discussion (Misc queries) 4 February 8th 05 10:37 PM
Excel error - Startup (and Acrobat PDFMaker) gxdata Setting up and Configuration of Excel 0 February 4th 05 03:44 AM
Merge from Excel to Excel dalstar Excel Discussion (Misc queries) 3 January 30th 05 02:37 PM
Excel 2002 and 2000 co-install. Control Which Starts ? cnuk Excel Discussion (Misc queries) 2 January 17th 05 08:07 PM
Shortcut file fails to open JimH Excel Discussion (Misc queries) 3 January 15th 05 10:13 PM


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