Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When you hit ctrl-end, does this take you further down and to the right than
what you'd expect. If you use some of the techniques at Debra Dalgleish's site to reset that last used cell, does your code work ok? http://contextures.com/xlfaqApp.html#Unused Other options would include copying just the data you want to a new worksheet in a new workbook and saving from there. Or writing your own code to extract the comma separated values. You can get a leg up on that code by reviewing these: Earl Kiosterud's Text Write program: www.smokeylake.com/excel (or directly: http://www.smokeylake.com/excel/text_write_program.htm) Chip Pearson's: http://www.cpearson.com/excel/imptext.htm J.E. McGimpsey's: http://www.mcgimpsey.com/excel/textfiles.html 7below wrote: 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! -- Dave Peterson |
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) |