Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to un-highlight pasted range? 1

Status
Not open for further replies.

HughLerwill

Programmer
Nov 22, 2004
1,818
GB
Dear All,

I'm manipulating some Excel Workbooks using VB6.

When pasting into a Sheet range the area pasted appears highlighted. It is possible to drop the highlight by doing something like;

Sheets(1).Cells(1,1).Select (or Activate)

but this will only work if the Sheet(instance of Excel) is visible. How can I get rid of the highlight on a Sheet which is not visible?

CutCopyMode is not doing it for me.

regards Hugh

 


Hugh,

Fully qualify the reference...
Code:
xlApp.Workbooks("WhichOne.xls").Worksheets("WhichSheet").Cells(1,1).Select


Skip,

[glasses] [red]Be Advised![/red]
Alcohol and Calculus do not mix!
If you DRINK, don't DERIVE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top