Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Prompt for cells on open

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Prompt for cells on open

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
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
Need open-prompt & ref. formulas mkerstei[_2_] Excel Programming 0 May 31st 06 09:35 PM
Bypass prompt to open XML file as XML list? Steve Vincent Excel Discussion (Misc queries) 0 March 13th 06 10:05 PM
Code to open new workbook, prompt for 'save as' name. Mark Excel Programming 1 April 5th 05 10:49 PM
workbook open read only without prompt turbogoat Excel Programming 1 August 26th 04 10:44 PM
Can a MACRO prompt for the filename to open and/or save? Dave Peterson[_3_] Excel Programming 1 September 3rd 03 04:53 PM


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