Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Help with VB macro for Excel

Hi, I use Excel 2003 and need to write a macro that will simulate a
click on a button in the Excel toolbar, which has been put there by a
separate program. Then a drop-down menu appears and a selection must
be made from it by the macro. Can anyone supply me with a simple
script to do this, or alternatively, point me to where I may be able
to get help with it? Many thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Help with VB macro for Excel

programmernovice formulated on Tuesday :
Hi, I use Excel 2003 and need to write a macro that will simulate a
click on a button in the Excel toolbar, which has been put there by a
separate program. Then a drop-down menu appears and a selection must
be made from it by the macro. Can anyone supply me with a simple
script to do this, or alternatively, point me to where I may be able
to get help with it? Many thanks in advance.


Try...

CommandBars(1).Controls("MainMenuName").Controls(" SubMenuName").Execute

(Substitute the obvious expressions with actual menu text)

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Help with VB macro for Excel

On Jun 7, 7:06*pm, GS wrote:
programmernovice formulated on Tuesday :

Hi, I use Excel 2003 and need to write a macro that will simulate a
click on a button in the Excel toolbar, which has been put there by a
separate program. *Then a drop-down menu appears and a selection must
be made from it by the macro. * Can anyone supply me with a simple
script to do this, or alternatively, point me to where I may be able
to get help with it? * Many thanks in advance.


Try...

CommandBars(1).Controls("MainMenuName").Controls(" SubMenuName").Execute

(Substitute the obvious expressions with actual menu text)

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Many thanks Garry. Works like a charm.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Help with VB macro for Excel

On Jun 7, 8:06*pm, GS wrote:
programmernovice formulated on Tuesday :

Hi, I use Excel 2003 and need to write a macro that will simulate a
click on a button in the Excel toolbar, which has been put there by a
separate program. *Then a drop-down menu appears and a selection must
be made from it by the macro. * Can anyone supply me with a simple
script to do this, or alternatively, point me to where I may be able
to get help with it? * Many thanks in advance.


Try...

CommandBars(1).Controls("MainMenuName").Controls(" SubMenuName").Execute

(Substitute the obvious expressions with actual menu text)

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Garry, after the above procedure a box is opened by the outside
application requesting a password. Is there some way to enter one
using an Excel VBA macro? Thanks again for your help.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Help with VB macro for Excel

It happens that programmernovice formulated :
On Jun 7, 8:06*pm, GS wrote:
programmernovice formulated on Tuesday :

Hi, I use Excel 2003 and need to write a macro that will simulate a
click on a button in the Excel toolbar, which has been put there by a
separate program. *Then a drop-down menu appears and a selection must
be made from it by the macro. * Can anyone supply me with a simple
script to do this, or alternatively, point me to where I may be able
to get help with it? * Many thanks in advance.


Try...

CommandBars(1).Controls("MainMenuName").Controls(" SubMenuName").Execute

(Substitute the obvious expressions with actual menu text)

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Garry, after the above procedure a box is opened by the outside
application requesting a password. Is there some way to enter one
using an Excel VBA macro? Thanks again for your help.


What are you doing, EXACTLY? What is the "outside application"? Does it
take parameters for passing a password to it? ...need more info to be
able to better help you with this, but the solution will require that
you know the password.

You really need to provide more info AND even code sample from your
project if possible.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Help with VB macro for Excel

On Jun 8, 2:06*pm, GS wrote:
It happens that programmernovice formulated :





On Jun 7, 8:06 pm, GS wrote:
programmernovice formulated on Tuesday :


Hi, I use Excel 2003 and need to write a macro that will simulate a
click on a button in the Excel toolbar, which has been put there by a
separate program. Then a drop-down menu appears and a selection must
be made from it by the macro. Can anyone supply me with a simple
script to do this, or alternatively, point me to where I may be able
to get help with it? Many thanks in advance.


Try...


CommandBars(1).Controls("MainMenuName").Controls(" SubMenuName").Execute


(Substitute the obvious expressions with actual menu text)


--
Garry


Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Garry, after the above procedure a box is opened by the outside
application requesting a password. *Is there some way to enter one
using an Excel VBA macro? *Thanks again for your help.


What are you doing, EXACTLY? What is the "outside application"? Does it
take parameters for passing a password to it? ...need more info to be
able to better help you with this, but the solution will require that
you know the password.

You really need to provide more info AND *even code sample from your
project if possible.

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc- Hide quoted text -

- Show quoted text -


Thanks Garry. It's a very simple thing, a single line of code (which
you gave me)

CommandBars(1).Controls("RealTick®").Controls("Sta rt...").Execute

The application is called RealTick for Excel, and, as you see it puts
a button on the Excel
toolbar from which my macro selects "Start..." from the drop-down
menu, which produces the box requesting the password. I, of course
know the password, since I pay for their financial data service.
Hopefully this tells you enough. Your assistance and patience are
greatly appreciated.
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Help with VB macro for Excel

Their website says they have APIs, which suggests you can automate this
software via code. I'd ask them what the APIs do and whether it can be
automated via Excel VBA. Chances look good that they can help you with
this!

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Help with VB macro for Excel

On Jun 8, 4:43*pm, GS wrote:
Their website says they have APIs, which suggests you can automate this
software via code. I'd ask them what the APIs do and whether it can be
automated via Excel VBA. Chances look good that they can help you with
this!

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Many thanks Garry. One last thing, can you recommend a good book for
VBA Excel which has the syntax for all functions and commands? Thanks
again for helping my out.
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Help with VB macro for Excel

One last thing, can you recommend a good book for VBA
Excel which has the syntax for all functions and commands?


The VB help files are your best bet for that. Go into the VB editor and
click...

Help/Microsoft Visual Basic Help

on its menu bar. A "Table of Contents" dialog box will open up. Click on...

Microsoft Visual Basic Documentation

in the listing, then click on...

Visual Basic Language Reference

in the listing that opened up. In the next list that opened up is all the
language elements available in VB... just click to explore what you want and
the syntax is available for each. If you ever need to look up a specific
item, there is a short-cut to get to the help file for it. If you have the
key word in a code listing already, just put your text cursor anywhere on or
next to that key word and press F1... the help file for that individual item
will open up. If you do not have it in a listing anywhere, just type the key
word into the Immediate Window, make sure your text cursor is on or next to
the key word and, again, press F1.

Rick Rothstein (MVP - Excel)

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Help with VB macro for Excel

On Jun 9, 11:51*am, "Rick Rothstein"
wrote:
One last thing, can you recommend a good book for VBA
Excel which has the syntax for all functions and commands?


The VB help files are your best bet for that. Go into the VB editor and
click...

* * *Help/Microsoft Visual Basic Help

on its menu bar. A "Table of Contents" dialog box will open up. Click on....

* * *Microsoft Visual Basic Documentation

in the listing, then click on...

* * *Visual Basic Language Reference

in the listing that opened up. In the next list that opened up is all the
language elements available in VB... just click to explore what you want and
the syntax is available for each. If you ever need to look up a specific
item, there is a short-cut to get to the help file for it. If you have the
key word in a code listing already, just put your text cursor anywhere on or
next to that key word and press F1... the help file for that individual item
will open up. If you do not have it in a listing anywhere, just type the key
word into the Immediate Window, make sure your text cursor is on or next to
the key word and, again, press F1.

Rick Rothstein (MVP - Excel)


Many thanks for the information.
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 Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve[_84_] Excel Programming 3 July 6th 06 07:42 PM
translate lotus 1-2-3 macro into excel macro using excel 2000 krutledge0209 Excel Programming 1 November 2nd 04 05:50 PM
Excel Macro Issue Trying to autorun Macro Upon Opening Worksheet wyndman Excel Programming 2 May 25th 04 06:59 PM


All times are GMT +1. The time now is 02:16 PM.

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"