Multiple inputs from "Input Box"
Here's how I do it:
Dim ReportTime As String
Dim strDate As String
Dim strTime As String
ReportTime = InputBox("Enter date and time (24-hour time format):" &
vbCr & vbCr & "Ex: 8/1/2008 18:30 (for 6:30 pm).")
strDate = Left$(ReportTime, WorksheetFunction.Find(" ", ReportTime) -
1)
strTime = Right$(ReportTime, Len(ReportTime) -
WorksheetFunction.Find(" ", ReportTime))
After you run this, the two separate elements from the Inputbox are
stored in two string variables.
HTH,
JP
On Aug 11, 2:26*pm, Megadrone
wrote:
I want to get multiple entries to paste to another sheet. I have the
following input box working to request one entry. Can anyone tell me how to
use the same box for multiple requests to append to "Sheet1"? Also, if entry
is wrong, I need to just return them back to the input box.
Please forgive any mistakes, I just had brain surgery...Really!!
Market = Application.InputBox("Enter your market")
* * Sheets("Daily_info").Select
* * Range("A1").Select
* * Selection.AutoFilter
* * Selection.AutoFilter Field:=18, Criteria1:=Market, Operator:=xlAnd
* * Range("A1").Select
* * Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
* * Selection.Copy
* * Sheets("Sheet1").Select
* * ActiveSheet.Paste
|