Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I'm currently using a macro to prompt a user to save a sheet as a CSV
file. I already have code in place that hides all the unwanted cells and whilst the CSV file saves perfectly when done manually, looking like this: asf,adsff,fsdf gtre,ffdf,etth when I run the appropriate part of the code, which is this: Do fname = Application.GetSaveAsFilename(fileFilter:="CSV files (*.csv), *.csv") Loop Until fname < False Workbooks(newreport).SaveAs Filename:=fname, FileFormat:=xlCSV,_ CreateBackup:=False, Local:=True Workbooks(fname).Saved = True Workbooks(fname).Close it produces a CSV file that looks like this: asaf,dsdf,fadsf,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, fdsd,fdsf,fdsf,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,, I just can't figure out why this is happening, even if I go and actually record the code there appears to be no differences.. Can any one help? Thanks in advance! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
WHY IS FREEZE PAINS GREYED OUT | Excel Discussion (Misc queries) | |||
Unwanted Prompt When Saving a Protected Sheet in 2007 | Excel Discussion (Misc queries) | |||
Unwanted cells at end of document rows and columns | Excel Discussion (Misc queries) | |||
Excel 2003 unwanted automatic Text to Columns | Setting up and Configuration of Excel | |||
Unwanted Automatic Link Update | Excel Discussion (Misc queries) |