MrExcel Publishing
Your One Stop for Excel Tips & Solutions

In vba go to a specific cell


Posted by Laura on July 28, 2001 8:49 PM

Hi,
Is it possible that after the vba code has run to select
another cell, heres an example of the code:
Sub CommandButton_Click()
Range ("B34").Select
If [A34] > 0 And [B34] > 0 Then
[B34].Value = [A34 * B34]
'The ActiveCell at this point is B34, now I would like
the ActiveCell to be A34,that is the cell for data
entry that completes the overall calculation.
Any feedback would be appreciated.
Laura T.


Posted by Jimmy on July 28, 2001 9:26 PM


You don't need to select B34 at all.
Just use :-
Sub CommandButton_Click()
[A34].Select
If [A34] > 0 And [B34] > 0 Then
[B34].Value = [A34 * B34]

Posted by Laura on July 29, 2001 8:24 AM

Thanks, Jimmy