Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default how do I update stock quotes using automation with vb

I'm using VB 6 with Win XP Pro and Office 2002. I have a spreadsheet with msn
stock quotes that updates successfully using the keyboard (alt+u) or the
mouse (click on update quotes).

However, sending the same keys using sendkeys from VB 6 produces the "#Name"
error in Excel, with no prices updated.

Any ideas on how to use sendkeys to accomplish the quote update? Or another
method?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default how do I update stock quotes using automation with vb

What routine is called when you click the button from the worksheet? Why not
call that routine from your VB program?

BTW, MS has a stock quotes add-in that you can download from their web site.


On Tue, 4 Oct 2005 13:03:21 -0700, John F
wrote:

I'm using VB 6 with Win XP Pro and Office 2002. I have a spreadsheet with msn
stock quotes that updates successfully using the keyboard (alt+u) or the
mouse (click on update quotes).

However, sending the same keys using sendkeys from VB 6 produces the "#Name"
error in Excel, with no prices updated.

Any ideas on how to use sendkeys to accomplish the quote update? Or another
method?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default how do I update stock quotes using automation with vb

I am using the MSN stock quotes addin to update the quotes. I have tried
creating a macro to click the Update button, but the macro doesn't recognize
the click event. Is there a macro setting that prevents some click events
from being recognized?

Thanks

"Myrna Larson" wrote:

What routine is called when you click the button from the worksheet? Why not
call that routine from your VB program?

BTW, MS has a stock quotes add-in that you can download from their web site.


On Tue, 4 Oct 2005 13:03:21 -0700, John F
wrote:

I'm using VB 6 with Win XP Pro and Office 2002. I have a spreadsheet with msn
stock quotes that updates successfully using the keyboard (alt+u) or the
mouse (click on update quotes).

However, sending the same keys using sendkeys from VB 6 produces the "#Name"
error in Excel, with no prices updated.

Any ideas on how to use sendkeys to accomplish the quote update? Or another
method?

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default how do I update stock quotes using automation with vb

John F wrote:
I'm using VB 6 with Win XP Pro and Office 2002. I have a spreadsheet with msn
stock quotes that updates successfully using the keyboard (alt+u) or the
mouse (click on update quotes).

However, sending the same keys using sendkeys from VB 6 produces the "#Name"
error in Excel, with no prices updated.

Any ideas on how to use sendkeys to accomplish the quote update? Or another
method?

Thanks


If you right click on the button and follow your nose through the menus a bit
you can see the name of the macro assigned to that button. Then from your macro
you're writing you can just directly call that macro by name rather than
screwing around with the button.

Bill
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default how do I update stock quotes using automation with vb

I tried this but the MSN commands don't show up in the Commands list.
Thanks

"Bill Martin" wrote:

John F wrote:
I'm using VB 6 with Win XP Pro and Office 2002. I have a spreadsheet with msn
stock quotes that updates successfully using the keyboard (alt+u) or the
mouse (click on update quotes).

However, sending the same keys using sendkeys from VB 6 produces the "#Name"
error in Excel, with no prices updated.

Any ideas on how to use sendkeys to accomplish the quote update? Or another
method?

Thanks


If you right click on the button and follow your nose through the menus a bit
you can see the name of the macro assigned to that button. Then from your macro
you're writing you can just directly call that macro by name rather than
screwing around with the button.

Bill



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default how do I update stock quotes using automation with vb

John F wrote:
I tried this but the MSN commands don't show up in the Commands list.
Thanks

"Bill Martin" wrote:


John F wrote:

I'm using VB 6 with Win XP Pro and Office 2002. I have a spreadsheet with msn
stock quotes that updates successfully using the keyboard (alt+u) or the
mouse (click on update quotes).

However, sending the same keys using sendkeys from VB 6 produces the "#Name"
error in Excel, with no prices updated.

Any ideas on how to use sendkeys to accomplish the quote update? Or another
method?

Thanks


If you right click on the button and follow your nose through the menus a bit
you can see the name of the macro assigned to that button. Then from your macro
you're writing you can just directly call that macro by name rather than
screwing around with the button.

Bill

------------------------

There are no command lists involved.

Right click on the button, then on "Assign Macro" and you should see the name of
the called macro in the little box at the top of the panel. Cancel out of
there, then create a new macro as follows:

sub ExecuteButton()
Call ButtonNameMacro()
end sub

You should see the button macro executed when you run this new macro.

Bill

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default how do I update stock quotes using automation with vb

Bill;
If I right-click on the Update button I get a menu of toolbars, as if
clicking on the View-Toolbars menu.

However, I have found a workaround - if I manually open Excel and leave it
running the VB Sendkeys method is successful. If VB starts Excel, then the
Sendkeys method fails.

Thanks to all for helping.

John F.

"Bill Martin" wrote:

John F wrote:
I tried this but the MSN commands don't show up in the Commands list.
Thanks

"Bill Martin" wrote:


John F wrote:

I'm using VB 6 with Win XP Pro and Office 2002. I have a spreadsheet with msn
stock quotes that updates successfully using the keyboard (alt+u) or the
mouse (click on update quotes).

However, sending the same keys using sendkeys from VB 6 produces the "#Name"
error in Excel, with no prices updated.

Any ideas on how to use sendkeys to accomplish the quote update? Or another
method?

Thanks


If you right click on the button and follow your nose through the menus a bit
you can see the name of the macro assigned to that button. Then from your macro
you're writing you can just directly call that macro by name rather than
screwing around with the button.

Bill

------------------------

There are no command lists involved.

Right click on the button, then on "Assign Macro" and you should see the name of
the called macro in the little box at the top of the panel. Cancel out of
there, then create a new macro as follows:

sub ExecuteButton()
Call ButtonNameMacro()
end sub

You should see the button macro executed when you run this new macro.

Bill


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default how do I update stock quotes using automation with vb

John F wrote:
Bill;
If I right-click on the Update button I get a menu of toolbars, as if
clicking on the View-Toolbars menu.

However, I have found a workaround - if I manually open Excel and leave it
running the VB Sendkeys method is successful. If VB starts Excel, then the
Sendkeys method fails.

Thanks to all for helping.

John F.

"Bill Martin" wrote:


John F wrote:

I tried this but the MSN commands don't show up in the Commands list.
Thanks

"Bill Martin" wrote:



John F wrote:


I'm using VB 6 with Win XP Pro and Office 2002. I have a spreadsheet with msn
stock quotes that updates successfully using the keyboard (alt+u) or the
mouse (click on update quotes).

However, sending the same keys using sendkeys from VB 6 produces the "#Name"
error in Excel, with no prices updated.

Any ideas on how to use sendkeys to accomplish the quote update? Or another
method?

Thanks


If you right click on the button and follow your nose through the menus a bit
you can see the name of the macro assigned to that button. Then from your macro
you're writing you can just directly call that macro by name rather than
screwing around with the button.

Bill


------------------------

There are no command lists involved.

Right click on the button, then on "Assign Macro" and you should see the name of
the called macro in the little box at the top of the panel. Cancel out of
there, then create a new macro as follows:

sub ExecuteButton()
Call ButtonNameMacro()
end sub

You should see the button macro executed when you run this new macro.

Bill


-------------------

Ah -- apparently your button in question was placed into the tool bar rather
than onto the spreadsheet itself. That's typically done from within the VBA
code of the application. You'd have to look into the VBA to understand what
they're calling.

Bill
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
Stock Quotes #VALUE for some entires on update Mark Taylor Excel Discussion (Misc queries) 1 March 11th 08 07:12 PM
MSN Stock Quotes Addin fails to update [email protected] Excel Worksheet Functions 1 February 14th 08 01:02 PM
How do i get historical stock quotes using MSN Money Stock Quotes Ash Excel Discussion (Misc queries) 0 May 11th 06 03:26 AM
Stock quotes Craig Excel Discussion (Misc queries) 3 April 30th 05 11:11 PM
DDE link update for stock quotes [email protected] Excel Programming 0 August 27th 03 04:13 PM


All times are GMT +1. The time now is 03:13 AM.

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"