View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JR Hester JR Hester is offline
external usenet poster
 
Posts: 170
Default Getting input within macro without the input box

Thanks to all the posters and responders, whose Q&A I've read to get me this
far.

I am looking for a simple way to direct users through a spreadsheet and
accept data entry in specific locations. I have the following code that is
functional, but I wonder if thre might not be a more efficient way of
accomplishing this task. I would prefer to simply move to a cell, and accept
data entry directly into the cell, then advance to the next assigned location
when the ENTER key finalizes the cell input.
With 64 non-contiguous cells requiring data entry, you amy see why I am
looking for a shorter solution. Plus my users are used to teh look and feel
of the spreadsheet cells, and the dialog boxes confuse them.

Here is currently functional macro, for first three cells only

Dim InputData As String
Application.Goto reference:=Range("B1") ' go to B2 on open sheet
InputData = InputBox("Promt to input", "Please input your data", "")
Range("B1").Value = InputData 'Retrieve InputData value to range B1
Application.Goto reference:=Range("G1")
InputData = InputBox("Promt to input", "Please input your data", "")
Range("G1").Value = InputData 'place data into cell G1
Application.Goto reference:=Range("C4") 'Go to C4, accept data
InputData = InputBox("Promt to input", "Please input your data", "")
Range("C4").Value = InputData 'Retrieve InputData value to range C4
'
Thanks for any suggestion, pointers etc.