From: Kenneth A. Larsen on

"SammyL" <sammyl(a)gmail.com> wrote in message
news:009dd49c-d1f9-4e65-a09e-f4342f4379e4(a)v37g2000vbv.googlegroups.com...
> Hi All,
>
> I am using a vbs to create an excel file from sql data, I then add and
> run a macro to format the excel, and then remove the macro using
> "xlbook.VBProject.VBComponents.Remove
> xlbook.VBProject.VBComponents("Module1") " in order to send the users
> a clean excel without the macro. When the user tries to download using
> pop3 it results in an error and the file cannot download. There seems
> to be something remaining in the file after removing the macro that is
> causing it to drive pop3 crazy. it seems that there is remnant of the
> macro after removal.
>
> If i skip creation of the macro i can send successfully, but the users
> need it formatted.
>
> I also tried formatting from vbs, such as
> xlapp.ActiveSheet.PageSetup.Orientation = xlapp.xlLandScape and keep
> getting an error that i cannot set the properties.
> Please help!
>
>Dear SammyL,
If you are doing an exlbook, you can do it in Microsoft Excel. By the way,
if you skip creation of the macro that can be sent successfully, you can use
a formatt text. Ifthat doesn't work, please E-Mail me at 2 addresses.
LarsenK(a)verizon.net or kuhlpc#2(a)optimum.net.

From,
Kenny


 | 
Pages: 1
Prev: CopyFile readonly
Next: Excel Pivot Table