B
Bob Leonard
Using XP & Excel 2000
Trying to figure out how to enter data in worksheet cell
ex: G125 & G126; that could be used by the Macro to
establish &/or change the Loop Start & Stopping row.
Currently loop starts A128 & stops at A131
For instance might want to enter data for 10/24/03 in
only row 129.
Indented code in Macro where my attempts to tell loop
where to stop
Thanks fo any help! Bob Leonard
ROW A B C D E F G
125 START>
126 END>
127
128 10/17/03
129 10/24/03
130 10/31/03
131 11/10/03
132 11/17/03
133
134
Sub ForDoLoopEnterDataRight()
Dim Value As String, ows As Range
'Below is starting cell
Range("A128").Select
'Below is ending cell
MyStop = Range("A131")
'Dim varInput As String
'Range("G126").Select
'Set ows = ActiveCell
' varInput = InputBox("Enter Cell Reference")
'ActiveCell.Formula = varInput
'ows.Activate
'MyStop = varInput
' Dim Myvariable(1) As String
'Range("G126").Value = Myvariable(1)
'Myvariable(1) = MyStop
'Static MyStop As String
'Range("G126").Value = MyStop
varAnswer = MsgBox("MyStop is A131; To EDIT
Macro", vbOKOnly, "My Stop Area")
Do
For I = 1 To 5
ActiveCell.Offset(0, 1).Select
Set ows = ActiveCell
Value = InputBox("Enter Value")
ActiveCell.Formula = Value
ows.Activate
Next I
ActiveCell.Offset(0, -5).Range("A1").Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.Activate
varAnswer = MsgBox(ActiveCell.Value,
vbOKOnly, "Date")
Loop Until ActiveCell = MyStop
End Sub
Trying to figure out how to enter data in worksheet cell
ex: G125 & G126; that could be used by the Macro to
establish &/or change the Loop Start & Stopping row.
Currently loop starts A128 & stops at A131
For instance might want to enter data for 10/24/03 in
only row 129.
Indented code in Macro where my attempts to tell loop
where to stop
Thanks fo any help! Bob Leonard
ROW A B C D E F G
125 START>
126 END>
127
128 10/17/03
129 10/24/03
130 10/31/03
131 11/10/03
132 11/17/03
133
134
Sub ForDoLoopEnterDataRight()
Dim Value As String, ows As Range
'Below is starting cell
Range("A128").Select
'Below is ending cell
MyStop = Range("A131")
'Dim varInput As String
'Range("G126").Select
'Set ows = ActiveCell
' varInput = InputBox("Enter Cell Reference")
'ActiveCell.Formula = varInput
'ows.Activate
'MyStop = varInput
' Dim Myvariable(1) As String
'Range("G126").Value = Myvariable(1)
'Myvariable(1) = MyStop
'Static MyStop As String
'Range("G126").Value = MyStop
varAnswer = MsgBox("MyStop is A131; To EDIT
Macro", vbOKOnly, "My Stop Area")
Do
For I = 1 To 5
ActiveCell.Offset(0, 1).Select
Set ows = ActiveCell
Value = InputBox("Enter Value")
ActiveCell.Formula = Value
ows.Activate
Next I
ActiveCell.Offset(0, -5).Range("A1").Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.Activate
varAnswer = MsgBox(ActiveCell.Value,
vbOKOnly, "Date")
Loop Until ActiveCell = MyStop
End Sub