View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Extra "." in file name when creating zip file in 2007 with 2003 co

Small fix

This will work for Excel 97-200 and 2007-2010 files
http://www.rondebruin.nl/windowsxpzip.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Ron de Bruin" wrote in message ...
Hi David

I see that the macro on my site is not correct
I will update it today and post the link here

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"David" wrote in message ...
I have some code that works great in Excel 2003, but in 2007, when creating a
zip file, there is an extra "." in the file name, like filenameZ..zip. It
happens in both the filename inside the zip file AND in the zip file itself.
Here is the suspect code:
FileNameZip = DefPath & Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) -
4) & ".zip"
FileNameXls = DefPath & Left(ActiveWorkbook.Name,
Len(ActiveWorkbook.Name) - 4) & "Z" & ".xlsm"
I've changed the file extension to xlsm, but if I try to change the
FileNameXls to Xlsm, it does not work.
Does anyone have any ideas? I got this code from Ron several years ago.
THanks much!