Is there a way I can make :
Dim MyDate, MyDay
MyDate = Worksheets("Calc").Range("B1").Value
MyDay = Day(MyDate)
Sit in a module named as a macro with something I made up like "Sub RowSelector()"
Sub RowSelector()
Dim MyDate, MyDay
MyDate = Worksheets("Calc").Range("B1").Value
MyDay = Day(MyDate)
End Sub
and then call that macro to activate when I need it? So Instead of :
Private Sub TextBox5_Change()
Dim MyDate, MyDay
MyDate = Worksheets("Calc").Range("B1").Value
MyDay = Day(MyDate)
Range("E" & MyDay).Value = Me.TextBox5.Value
End Sub
I would like have:
Private Sub TextBox5_Change()
Execute RowSelector 'I have no idea but just for example of what i need.
Range("E" & MyDay).Value = Me.TextBox5.Value
End Sub
I am asking not only for this, but I have another set of instructions much larger that I need to be able to call in the same way.
I could probably handle the bulk thsi current method is causing me here, but my other code I need to call repeatedly would be huge.
Bookmarks