Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I want to run macro "Wathba" on every CSV format file on opening. Plz help Thanks & Regards Hassan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... Hi All, I want to run macro "Wathba" on every CSV format file on opening. Plz help Thanks & Regards Hassan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Opening a .csv file thru a macro | Excel Programming | |||
Can a macro be run on opening the file? | Excel Discussion (Misc queries) | |||
Can a macro be run on opening the file? | Excel Discussion (Misc queries) | |||
File opening via Macro with varying file name | Excel Programming |