bcschouten
08-07-2003, 08:11 AM
Hello,
I want to copy the columns of sheet1 to sheet3 in a different order.
I have made a table on sheet2 in wich order the columns have to be coppied. This is my code ( for 3 columns ):
Sub Button1()
Sheets("Sheet1").Select
Columns("B:B").Select <- I want B:B to be the variable placed in the table on sheet2
Selection.Copy
Sheets("Sheet3").Select
Columns("A:A").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Columns("A:A").Select
Selection.Copy
Sheets("Sheet").Select
Columns("B:B").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Columns("C:C").Select
Selection.Copy
Sheets("Sheet3").Select
Columns("C:C").Select
ActiveSheet.Paste
End Sub
Hope you guys can help me out.
Tnx
I want to copy the columns of sheet1 to sheet3 in a different order.
I have made a table on sheet2 in wich order the columns have to be coppied. This is my code ( for 3 columns ):
Sub Button1()
Sheets("Sheet1").Select
Columns("B:B").Select <- I want B:B to be the variable placed in the table on sheet2
Selection.Copy
Sheets("Sheet3").Select
Columns("A:A").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Columns("A:A").Select
Selection.Copy
Sheets("Sheet").Select
Columns("B:B").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Columns("C:C").Select
Selection.Copy
Sheets("Sheet3").Select
Columns("C:C").Select
ActiveSheet.Paste
End Sub
Hope you guys can help me out.
Tnx