Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Opening the VB Editor via VB

Guys ive created a custom toolbar and to save time doing it again at work ive
created my toolbar using VB macro. simple enough! however theres a few
options i cant find how to code.

the first is the vb editor. i know i can press alt f11 or simply add the
command via the customiser but how do i call it via vb?

the second is the macro box where you select the macro you require from the
list box.

can anyone help?

Rivers
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Opening the VB Editor via VB

Application.VBE.MainWindow.Visible = True

Application.Dialogs(xlDialogMacroOptions).Show

"Rivers" wrote:

Guys ive created a custom toolbar and to save time doing it again at work ive
created my toolbar using VB macro. simple enough! however theres a few
options i cant find how to code.

the first is the vb editor. i know i can press alt f11 or simply add the
command via the customiser but how do i call it via vb?

the second is the macro box where you select the macro you require from the
list box.

can anyone help?

Rivers

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Opening the VB Editor via VB

hi thanks for the quick response but they do not work

the
Application.VBE.MainWindow.Visible = True

gives a warning of it cannot be trusted

end the
Application.Dialogs(xlDialogMacroOptions).Show

and this gives a warning of dialogue class failed

am i entering these in incorrectly

thanks again
rivers

"JLGWhiz" wrote:

Application.VBE.MainWindow.Visible = True

Application.Dialogs(xlDialogMacroOptions).Show

"Rivers" wrote:

Guys ive created a custom toolbar and to save time doing it again at work ive
created my toolbar using VB macro. simple enough! however theres a few
options i cant find how to code.

the first is the vb editor. i know i can press alt f11 or simply add the
command via the customiser but how do i call it via vb?

the second is the macro box where you select the macro you require from the
list box.

can anyone help?

Rivers

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Opening the VB Editor via VB

If your security setting is at medium you might get the message that it can't
be trusted, but it came right out of the VBA help file, so it is probably
just following the security protocol to warn you.

I cannot find any info on the MacroOptions dialog box, but it also is in the
VBA help files and should work unless Microsoft disabled it for some reason.
I could not get it to work either and like I said, nothing in the knowledge
base about it under that name. There is a MacroOptions method, but I don't
believe that would help you. You might look into using send keys to open the
dialog box for macros.

"Rivers" wrote:

hi thanks for the quick response but they do not work

the
Application.VBE.MainWindow.Visible = True

gives a warning of it cannot be trusted

end the
Application.Dialogs(xlDialogMacroOptions).Show

and this gives a warning of dialogue class failed

am i entering these in incorrectly

thanks again
rivers

"JLGWhiz" wrote:

Application.VBE.MainWindow.Visible = True

Application.Dialogs(xlDialogMacroOptions).Show

"Rivers" wrote:

Guys ive created a custom toolbar and to save time doing it again at work ive
created my toolbar using VB macro. simple enough! however theres a few
options i cant find how to code.

the first is the vb editor. i know i can press alt f11 or simply add the
command via the customiser but how do i call it via vb?

the second is the macro box where you select the macro you require from the
list box.

can anyone help?

Rivers

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,344
Default Opening the VB Editor via VB

Hi,

I believe the Application.Dialogs(xlDialogMacroOptions).Show
command has a number of arguments that are needed because this isn't the
Macros dialog box but the Options dialog box that displays when you click the
Optins button when you are in the Macros dialog box.

--
Thanks,
Shane Devenshire


"JLGWhiz" wrote:

If your security setting is at medium you might get the message that it can't
be trusted, but it came right out of the VBA help file, so it is probably
just following the security protocol to warn you.

I cannot find any info on the MacroOptions dialog box, but it also is in the
VBA help files and should work unless Microsoft disabled it for some reason.
I could not get it to work either and like I said, nothing in the knowledge
base about it under that name. There is a MacroOptions method, but I don't
believe that would help you. You might look into using send keys to open the
dialog box for macros.

"Rivers" wrote:

hi thanks for the quick response but they do not work

the
Application.VBE.MainWindow.Visible = True

gives a warning of it cannot be trusted

end the
Application.Dialogs(xlDialogMacroOptions).Show

and this gives a warning of dialogue class failed

am i entering these in incorrectly

thanks again
rivers

"JLGWhiz" wrote:

Application.VBE.MainWindow.Visible = True

Application.Dialogs(xlDialogMacroOptions).Show

"Rivers" wrote:

Guys ive created a custom toolbar and to save time doing it again at work ive
created my toolbar using VB macro. simple enough! however theres a few
options i cant find how to code.

the first is the vb editor. i know i can press alt f11 or simply add the
command via the customiser but how do i call it via vb?

the second is the macro box where you select the macro you require from the
list box.

can anyone help?

Rivers



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Opening the VB Editor via VB

I think my other message got lost in cyberspace. You are right, Shane.
After a lot of reading and research I had come to that conclusion. It is one
of the methods that I have never used and I was guessing at what it did. I
also found that the SendKeys:

Application.SendKeys "%{F8}"

Does not work either. It simply activates the menu bar, although manually
Alt + F8 will open the dialog box for macros. Send Keys is another one that
I rarely use, so I could be screwing it up. I don't know if it requires
Shell every time it runs or not.
I try to stay away from all those frilly things when I plan a project and
just use good ole VBA code syntax and methods.

"ShaneDevenshire" wrote:

Hi,

I believe the Application.Dialogs(xlDialogMacroOptions).Show
command has a number of arguments that are needed because this isn't the
Macros dialog box but the Options dialog box that displays when you click the
Optins button when you are in the Macros dialog box.

--
Thanks,
Shane Devenshire


"JLGWhiz" wrote:

If your security setting is at medium you might get the message that it can't
be trusted, but it came right out of the VBA help file, so it is probably
just following the security protocol to warn you.

I cannot find any info on the MacroOptions dialog box, but it also is in the
VBA help files and should work unless Microsoft disabled it for some reason.
I could not get it to work either and like I said, nothing in the knowledge
base about it under that name. There is a MacroOptions method, but I don't
believe that would help you. You might look into using send keys to open the
dialog box for macros.

"Rivers" wrote:

hi thanks for the quick response but they do not work

the
Application.VBE.MainWindow.Visible = True
gives a warning of it cannot be trusted

end the
Application.Dialogs(xlDialogMacroOptions).Show
and this gives a warning of dialogue class failed

am i entering these in incorrectly

thanks again
rivers

"JLGWhiz" wrote:

Application.VBE.MainWindow.Visible = True

Application.Dialogs(xlDialogMacroOptions).Show

"Rivers" wrote:

Guys ive created a custom toolbar and to save time doing it again at work ive
created my toolbar using VB macro. simple enough! however theres a few
options i cant find how to code.

the first is the vb editor. i know i can press alt f11 or simply add the
command via the customiser but how do i call it via vb?

the second is the macro box where you select the macro you require from the
list box.

can anyone help?

Rivers

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 Visual Basic Editor SteveG[_5_] Excel Discussion (Misc queries) 0 March 19th 09 01:46 PM
Excel default module when opening visual basic editor Mr TJA[_2_] Excel Programming 0 August 18th 08 04:53 PM
VB editor bug? John Excel Programming 1 May 24th 06 08:31 PM
How do I stop VB Editor window from opening when I run my macro Confucius Excel Programming 2 March 20th 06 03:00 PM
Opening Excel 2002 VBA Editor jacob[_2_] Excel Programming 1 July 9th 03 03:47 PM


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