Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello. I am very new to VBA coding... I have a spreadsheet that each time it
opens, I want it to prompt for a Start Date, End Date, and Employee Number. Then, take those three pieces of Data, and put them each in specific cells on my sheet. Anybody help me out in telling me how i would accomplish this? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Workbook_Open()
Dim StartDate As Date, EndDate As Date, EmployeeNum As String StartDate = Application.InputBox("Start date?") EndDate = Application.InputBox("End date?") EmployeeNum = Application.InputBox("Employee number?") Range("A1").Value = StartDate Range("B1").Value = EndDate Range("C1").Value = EmployeeNum 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) "cyb3rwolf" wrote in message ... Hello. I am very new to VBA coding... I have a spreadsheet that each time it opens, I want it to prompt for a Start Date, End Date, and Employee Number. Then, take those three pieces of Data, and put them each in specific cells on my sheet. Anybody help me out in telling me how i would accomplish this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need open-prompt & ref. formulas | Excel Programming | |||
Bypass prompt to open XML file as XML list? | Excel Discussion (Misc queries) | |||
Code to open new workbook, prompt for 'save as' name. | Excel Programming | |||
workbook open read only without prompt | Excel Programming | |||
Can a MACRO prompt for the filename to open and/or save? | Excel Programming |