Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default how to run macro on opening of file

Hi All,

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

Plz help

Thanks & Regards

Hassan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default how to run macro on opening of file

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default how to run macro on opening of file

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default how to run macro on opening of file

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening a .csv file thru a macro [email protected] Excel Programming 3 April 15th 08 09:48 PM
Can a macro be run on opening the file? Cortez Excel Discussion (Misc queries) 3 March 8th 07 08:34 PM
Can a macro be run on opening the file? Cortez Excel Discussion (Misc queries) 0 March 8th 07 04:57 PM
File opening via Macro with varying file name TomFish79 Excel Programming 3 August 15th 05 02:32 PM


All times are GMT +1. The time now is 10:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"