Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to activate form button

I don't know of a way to simulate the clicking of a forms toolbar butto
so that the Application.Caller shows up as the button name, but I hav
another suggestion.

1. Create a global variable in a standard module:

Public gbln_ExitOK As Boolean

2. Set it to False in your Workbook_Open event procedure.
3. Set it to True when you button is clicked or when the macro runs.
4. Check for it to be true instead of checking Application.Caller



--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Macro to activate form button

Thanks, that worked great, and was a much easier way to go about thanks

Thanks again

Ji

----- kkknie wrote: ----

I don't know of a way to simulate the clicking of a forms toolbar butto
so that the Application.Caller shows up as the button name, but I hav
another suggestion

1. Create a global variable in a standard module

Public gbln_ExitOK As Boolea

2. Set it to False in your Workbook_Open event procedure
3. Set it to True when you button is clicked or when the macro runs
4. Check for it to be true instead of checking Application.Calle




--
Message posted from http://www.ExcelForum.com


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
macro attached to command button - VBA form Roy Gudgeon[_2_] Excel Discussion (Misc queries) 2 March 16th 10 12:44 PM
Activate a form ? dhstein Excel Discussion (Misc queries) 5 July 30th 09 02:51 AM
button in a cell to activate a macro alexfair Excel Worksheet Functions 6 May 30th 08 03:09 PM
Form Buttons Connected to a Macro - Want to remove the button Wksht Excel Worksheet Functions 2 June 13th 07 06:58 PM
Attaching a macro to a VB button on a form WildGlio Excel Worksheet Functions 2 March 25th 05 11:11 PM


All times are GMT +1. The time now is 08:34 AM.

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

About Us

"It's about Microsoft Excel"