Re: 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" <ronald@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:87CB0B0A-D6FC-443E-B14C-3CDBB4CF2E00@xxxxxxxxxxxxxxxx
> 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


.



Relevant Pages

  • Re: Semicolon problem
    ... Dim sStr As String ... For Each cell In Selection ... If ans = vbYes Then ... > Sorry guys, when i created the thread i wanted to make the wrong> semicolon BOLD, but instead it added a * at both sides of the ...
    (microsoft.public.excel.programming)
  • Re: can you make a drop down list in a drop down list?
    ... "_range") and it will pull the appropriate sublist each time the JOBS cell is ... I have attempted to use the Data Validation window in the following ways to ... select "Custom" and put the concantenate function in the function entry ... set up the source lists for validation: ...
    (microsoft.public.excel.misc)
  • Re: IF statement to check if it is a number or word
    ... I want my ans to be actually this... ... Since your a is a cell array you should index into it using curly braces ... When you concatenate a string, ... the second is the cell that was in the middle of your concatenation. ...
    (comp.soft-sys.matlab)
  • Re: comboboxes
    ... This technique shows how to create dynamic dropdown lists in VBA. ... Combobox Version ... Data Validation Version ... Dim cell As Range ...
    (microsoft.public.excel.programming)
  • RE: Using a Userform instead of Data Validation
    ... Private Sub workSheet_BeforeDoubleClick(ByVal Target As Range, ... Dim isect As Range ... > Currently my VBA code adds a data validation to all rows where the gain/loss ... > list over to the cell that he double-clicked (so the actual choice of ref ...
    (microsoft.public.excel.programming)