ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Prompts (https://www.excelbanter.com/excel-discussion-misc-queries/83089-prompts.html)

sdmccabe

Prompts
 
Is it possible to prompt a user for an input (date) when a spreadsheet is
opened, and save that value in a cell?

Peo Sjoblom

Prompts
 
It won't work if the user doesn't enable macros when prompted

put it in ThisWorkbook module, it will put whatever you put in that input
box in sheet1 cell A1




Option Explicit

Private Sub Workbook_Open()

Dim vDate As String

vDate = InputBox("Please type in a date")

Worksheets("Sheet1").Range("A1") = vDate

End Sub


--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"sdmccabe" wrote in message
...
Is it possible to prompt a user for an input (date) when a spreadsheet is
opened, and save that value in a cell?





All times are GMT +1. The time now is 02:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com