Background Information
I have an inputbox to get a date from my user to process the sub procedure.
Problems
- I have trouble getting the rows and columns from the inputted value.
- How do I return the results at the row the user selected instead of a fixed spot a
cells(1, columns.count)
- I tried using .address to find the rows and columns. But it returns
invalid qualifier
could you please explain why?
Sub functionLoop()
Dim Nextoffday As Date
Dim i As Integer
Dim selectionRow As String
Nextoffday = Application.InputBox(prompt:="Please select the second off day.", Title:="Pick second off day", Type:=8)
For i = 1 To 30
If AFPDAY(Nextoffday + i) <> "" Then
ThisWorkbook.Worksheets(1).Cells(1, Columns.Count).End(xlToLeft).Offset(0, 1) = AFPDAY(Nextoffday + i)
End If
Next i
End Sub
Aucun commentaire:
Enregistrer un commentaire