Activate Cell Based On Test Result

F

fogbom

I want to activate a selected cell based on a test result. For example
in a form I ask a Yes/No question. If the answer is Yes I want th
next active cell to be (say) C62. If the answer is No the next activ
cell should be (say) K103.
I can generate a TRUE or FALSE result for my question but do not kno
how to use that result to GOTO the desired cell (make a particular cel
active).
Any suggestions
 
B

Bob Phillips

Try something like

ans = MsgBox "OK (Yes/No)?"

If UCase(ans) = "YES") Then
Range("C62").Select
Else
Range("K103")>Select
End If

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top