Hi All,

I want to run macro "Wathba" on every CSV format file on opening.

Plz help

Thanks & Regards

Hassan

RE: how to run macro on opening of file by Tausif

Tausif
Thu Jul 24 01:00:00 CDT 2008

Hi Hassan,

Since you want it to be open on every csv file format, Why dont save the
macro in personal.xls & run it when you need to open a csv file. ?
(Tools->Macro->Macros)

Cheers,
--
Tausif Mohammed


"Hassan" wrote:

> Hi All,
>
> I want to run macro "Wathba" on every CSV format file on opening.
>
> Plz help
>
> Thanks & Regards
>
> Hassan

RE: how to run macro on opening of file by Hassan

Hassan
Thu Jul 24 01:36:02 CDT 2008

Dear Tausif,

Kindly guide me full procedure plz.



"Tausif" wrote:

> Hi Hassan,
>
> Since you want it to be open on every csv file format, Why dont save the
> macro in personal.xls & run it when you need to open a csv file. ?
> (Tools->Macro->Macros)
>
> Cheers,
> --
> Tausif Mohammed
>
>
> "Hassan" wrote:
>
> > Hi All,
> >
> > I want to run macro "Wathba" on every CSV format file on opening.
> >
> > Plz help
> >
> > Thanks & Regards
> >
> > Hassan

Re: how to run macro on opening of file by Bob

Bob
Thu Jul 24 02:34:36 CDT 2008

Public WithEvents App As Application

Private Sub App_WorkbookOpen(ByVal Wb As Workbook)

If Wb.FileFormat = xlCSV Then Call mymacro
End Sub

Private Sub Workbook_Open()
Set App = Application
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
__________________________________
HTH

Bob

"Hassan" <Hassan@discussions.microsoft.com> wrote in message
news:7FA8377F-195B-45BD-8AA5-75C8DCC77076@microsoft.com...
> Hi All,
>
> I want to run macro "Wathba" on every CSV format file on opening.
>
> Plz help
>
> Thanks & Regards
>
> Hassan