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 TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy Excel column in VB6

Status
Not open for further replies.

IFRs

Petroleum
Joined
Nov 22, 2002
Messages
4,680
Location
US
I'm writing a Visual Basic program that accesses existing Excell files. I need to select an entire column and then insert the entire column, shifting all columns to the right. Excell's macro recorder shows:

Worksheets(1).Columns("C:C").Select
Worksheets(1).Selection.Copy
Worksheets(1).Selection.Insert Shift:=xlToRight

But, VB6 only likes the first line. This must be a simple question, I hope someone knows the answer!!

Thanks!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top