ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macros or input box (https://www.excelbanter.com/excel-programming/336507-macros-input-box.html)

Ronald

macros or input box
 
i wall i want to do is have the following msg come up:
Please enter the date you want to use in this format: ?/??/??
and have the data put into a cell of my choice

help please

Bob Phillips[_6_]

macros or input box
 
ans = Inputbox ("Please enter the date you want to use (in this format
dd/mm/yy):"
Range("A1").Value = Format(ans,"dd/mm/yy")

change the format to suit


--

HTH

RP
(remove nothere from the email address if mailing direct)


"ronald" wrote in message
...
i wall i want to do is have the following msg come up:
Please enter the date you want to use in this format: ?/??/??
and have the data put into a cell of my choice

help please




Tom Ogilvy

macros or input box
 
Look at Data validation. It can generate a message when a person selects a
cell.

If you want to run a macro

Sub Macro1()
Dim as as String
ans = InputBox("Please enter date you want to use in this format:
mm/dd/yy")
if isdate(ans) then
Range("B9").Value = Format(cDate(ans),"mm/dd/yyyy")
end if
End Sub

--
Regards,
Tom Ogilvy


"ronald" wrote in message
...
i wall i want to do is have the following msg come up:
Please enter the date you want to use in this format: ?/??/??
and have the data put into a cell of my choice

help please





All times are GMT +1. The time now is 05:35 PM.

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