View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
bhofsetz[_133_] bhofsetz[_133_] is offline
external usenet poster
 
Posts: 1
Default Getting input within macro without the input box


How about using a Worksheet_SelectionChange event and comment boxes to
give direction.

I'm sure some of the experts on this site could see ways to improve
this idea but this could be a start.
You could set this up in a loop which would loop through your list of
cells which need to be changed so updates/changes would be easier.

Be sure all the cells you want to user to enter data into have comment
boxes before testing the code otherwise it will give you errors.


Code:
--------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$B$2" Then
Range("B1").Comment.Visible = False
Range("G1").Comment.Visible = True
Application.Goto reference:=Range("G1")
End If
If Target.Address = "$G$2" Then
Range("G1").Comment.Visible = False
Range("F4").Comment.Visible = True
Application.Goto reference:=Range("F4")
End If
If Target.Address = "$F$5" Then
Range("F4").Comment.Visible = False
Range("D10").Comment.Visible = True
Application.Goto reference:=Range("D10")
End If
If Target.Address = "$D$11" Then
Range("D10").Comment.Visible = False
End If
End Sub

--------------------


HTH


--
bhofsetz
------------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807
View this thread: http://www.excelforum.com/showthread...hreadid=567184