vba code for deselecting?

zilch4ry

Board Regular
Joined
Feb 27, 2011
Messages
76
hi all,

quick question- ive written a visual basic code, but at the end it still has two cells highlighted, is there a code which deselects final cells?

cheers ;)
 

Some videos you may like

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

njimack

Well-known Member
Joined
Jun 17, 2005
Messages
7,764
Post your code. There's usually no need to select cells to perform actions on them.
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Hi. Just select a cell

Range("A1").Select

Or if you have been copying and pasting

Application.CutCopyMode=False
 

zilch4ry

Board Regular
Joined
Feb 27, 2011
Messages
76
thanks for the help, the cutcopy thing did the trick. i'm not great with vba :P
 

Watch MrExcel Video

Forum statistics

Threads
1,109,436
Messages
5,528,758
Members
409,834
Latest member
vexceled

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top