View Single Post
  #6   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 Ron for your continuing efforts and ideas. I am using Excel 2000. With
protection turned on, pressing [enter] simply moves teh active cell to teh
next contiguous cell, either to the right or down, depending upon the defined
movement setting for a particular range.

a sample of my movement begins at B1 and moves to G1, C4, E4, G4, D5, F5,
C7, A12, E12, F12, H12. The sequence never "backs up" to a cell to the left
or above. However teh spreadsheet is only 8 columns wide, with column H being
rightmost column.

If I could only find a way to "GOTO" next cell, "Pause" in that cell until
the [enter] key is depressed, then "GOTO" next cell in my sequence that would
be Ideal.

Thanks again for your determination

"Ron de Bruin" wrote:

If you hit enter you go to the next unlocked cell but if you want to go from
A1 to A10 and then to A3 then this is not working

Can you post a example from your range and how you want to loop through them

--
Regards Ron de Bruin
http://www.rondebruin.nl



"JR Hester" wrote in message ...
Protecting the spreadsheet will not direct users to required cell locations

"Ron de Bruin" wrote:

Hi JR Hester

Why not unlock only the 64 cells(ctrl-1.. Protection) and protect your sheet

For Excel 2002-2003
ToolsProtectionProtect sheet
Uncheck "select locked cells"

If you have a older version you must use code to do this


--
Regards Ron de Bruin
http://www.rondebruin.nl



"JR Hester" wrote in message ...
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.