ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   accept input and move active cell? (https://www.excelbanter.com/excel-programming/368621-accept-input-move-active-cell.html)

JR Hester

accept input and move active cell?
 
Totally new to macros and VBA, but may need then to accomplish a task.

Need to direct data entry into specific cell locations in Excel 2000.
Already have unlocked cells and protected worksheet. Need to find a way to do
something like this:
go to B2 on open sheet
accept data entry
Go to C4, accept data
Go to E4, accept input
and so and so on

I used the record macro process, but I can't find a way to cause the macro
to pause for input, between the go to commands. Therefore the result is that
It goes straight to the ending location!

I know it's do-able, just don't understand how! Any and all pointers
appreciated!

Thanks in advance


NickHK

accept input and move active cell?
 
I just seen there is Application.DataEntryMode.
Never used it, but you could maybe combine that with the Worksheet-Change
event.

NickHK

"JR Hester" wrote in message
...
Totally new to macros and VBA, but may need then to accomplish a task.

Need to direct data entry into specific cell locations in Excel 2000.
Already have unlocked cells and protected worksheet. Need to find a way to

do
something like this:
go to B2 on open sheet
accept data entry
Go to C4, accept data
Go to E4, accept input
and so and so on

I used the record macro process, but I can't find a way to cause the macro
to pause for input, between the go to commands. Therefore the result is

that
It goes straight to the ending location!

I know it's do-able, just don't understand how! Any and all pointers
appreciated!

Thanks in advance




[email protected]

accept input and move active cell?
 

Already have unlocked cells and protected worksheet. Need to find a way to do
something like this:
go to B2 on open sheet
accept data entry
Go to C4, accept data
Go to E4, accept input
and so and so on

Hi Hester,

it will better if you post you recorded macro ...

Halim


[email protected]

accept input and move active cell?
 
'Try this, place the code in the sheet module, view it by right click
'at sheets tab and choose "view code" :

Private Sub Worksheet_Activate()
Dim InputData As String
Application.Goto Reference:=Range("B2") ' go to B2 on open sheet
'accept data entry
Application.Goto Reference:=Range("C4") 'Go to C4, accept data
InputData = InputBox("Promt to input", "Please input your data",
"")
Range("E4").Value = InputData 'Retrieve InputData value to range E4
End Sub


JR Hester

accept input and move active cell?
 
Thanks for your reply.

Unfortunately I received a syntax error during the complie process so I
don't know where this leaves me.

Thanks again for theresponse

" wrote:

'Try this, place the code in the sheet module, view it by right click
'at sheets tab and choose "view code" :

Private Sub Worksheet_Activate()
Dim InputData As String
Application.Goto Reference:=Range("B2") ' go to B2 on open sheet
'accept data entry
Application.Goto Reference:=Range("C4") 'Go to C4, accept data
InputData = InputBox("Promt to input", "Please input your data",
"")
Range("E4").Value = InputData 'Retrieve InputData value to range E4
End Sub




All times are GMT +1. The time now is 09:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com