Problem with simple macro that works in 2003 not 2000?

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,047
I am using this code, which works perfectly for 2003

Sub CSVLBAFEB()
'
' CSVLBASEP Macro
' Macro recorded 14/09/2006 by Paul Hailes
'

'
Columns("FD:FF").Select
Selection.Copy
Workbooks.Add
Columns("A:A").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
ChDir "L:\Payroll"
ActiveWorkbook.SaveAs Filename:="L:\Payroll\LBAFEB07.csv", FileFormat:=xlCSV _
, CreateBackup:=False
End Sub




It seems to fail on the pasting of column Widths, even when i try to record a macro, by copying and pasting widths it fails? I dont understand...does anyone else ?
 
Thank you, Ivan,
this saved me an installation of 2000

this was not clear to me:
xlpastevalidation = NO CONT it is infact
did you mean it is no constant ? it is in the list in the helpfiles

best regards,
Erik
 
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Thank you, Ivan,
this saved me an installation of 2000

this was not clear to me:
xlpastevalidation = NO CONT it is infact
did you mean it is no constant ? it is in the list in the helpfiles

best regards,
Erik

Sorry Erick for not been clear.

What I meant is that the xlpastevalidation is not defined as a constant in Xl2000, it is actually xlDataValidation BUT this bugs out too.
 
Upvote 0
OK, thanks, Ivan

to be clear at 100% for future reference of other members which might stumble in to this thread
when I was talking about the helpfiles
it is in the list in the helpfiles
it is not about version 2000 but xl2003

best regards,
Erik
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,639
Members
449,093
Latest member
Ahmad123098

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top