![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 88
|
If I use:
SendKeys ("%fdm") from a standard macro it works fine. However if I try to use the exact same code from a button on a Userform I see the file menu flash real quick but nothing happens. I even tried having the commandbutton on the userform call the macro and it won't work. If I put a form button on the sheet directly and assign the macro to it, it works. But if I try it from a Userform it just will not work? This one has me pulling my hair out.. advance thanks |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Posts: 88
|
I figured it out myself!!
The menu item I was trying to call in Excel required a cell to be activated or the menu option was greyed out. So I had to change the code to: UserForm1.Hide Range("A1").Select SendKeys ("%fdm") Geez I HATE stuff like that.. thanks anyway.. |
|
|
|
|
|
#3 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi keith
Setting the CommandButtons TakeFocus******* Property MAY have also worked. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|