Deselecting cells and returning to certain cell using VB

mon03

New Member
Joined
Oct 28, 2005
Messages
4
Hi

I currently use the VB code listed below.

If (str = "INIT") Then
Worksheets("Main").Range(apptcell).Select
Selection.Interior.Color = RGB(255, 255, 0)
End If

The problem with this is used as part of data entry. Ie when "INIT" is typed it is at the end of the data entry, and when you press enter it does not return to say cell A5, rather it stays selected. How can I get it to return to cell A5 once i press enter? rather than have to press enter, then down arrow then home to return to cell A5. It is currently in cell E4

Any assistance would be greatly appreciated

Thanks
Mon
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hello mon03:
Have you thought about using the "Form..." wizard found on the "Data" menu for data entry ??
 
Upvote 0
The data entry is actually selected from a drop down list, where there are different options to select and each option has to be formatted accordingly.

Can I use a form for this???
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,559
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top