LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Macro attached to Menu Command Button

I assigned a macro to a Menu Command Button in File1 that opens another file
(File2) and then the File1 macro continues and calls a macro in File2 with
Application.Run "..." and then after the macro in File2 has run the last line
of code in the macro of File1 is to close File1,
Windows("File1.xls").Close(0). But I get an "Appliation Defined Error!"

Note: I dont want to go directly to File2 from the Command Button. I want
to use File1's macro assigned to the Command Button.

How do I do this and not get the error?

Thank you,

Steven


 
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
macro attached to command button - VBA form Roy Gudgeon[_2_] Excel Discussion (Misc queries) 2 March 16th 10 12:44 PM
Macro attached to New Menu item on toolbar Steven Excel Programming 1 June 5th 08 02:02 AM
adding command button to menu excel-tr Excel Programming 0 March 28th 07 02:01 AM
Macro attached to button runs twice Jozef[_2_] Excel Programming 0 November 4th 04 01:36 PM
MACRO ATTACHED TO A TOOLBAR BUTTON Joyce[_2_] Excel Programming 0 October 9th 03 07:30 PM


All times are GMT +1. The time now is 05:21 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"