Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
html to excel | Excel Discussion (Misc queries) | |||
Excel error - Startup (and Acrobat PDFMaker) | Setting up and Configuration of Excel | |||
Merge from Excel to Excel | Excel Discussion (Misc queries) | |||
Excel 2002 and 2000 co-install. Control Which Starts ? | Excel Discussion (Misc queries) | |||
Shortcut file fails to open | Excel Discussion (Misc queries) |