Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock 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
Nov 22, 2002
4,658
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