+ Reply to Thread
Results 1 to 5 of 5

Macro problem - stops after the hyperlink is downloaded

  1. #1
    Registered User
    Join Date
    09-13-2008
    Location
    Barrie, ON, CA
    Posts
    47

    Macro problem - stops after the hyperlink is downloaded

    Hello,

    Please find attached worksheet. There is a macro that u can activate using CTRL +SHIFT+ Q. The macro is to follow a hyperlink that will download stock price history, copy it to the workbook and close the window of the original data.

    For some reason the macro stops after the hyperlink is downloaded... it doesn't state an error it just neglects all code after the hyperlink. Can anyone help me out with this.
    Attached Files Attached Files
    Last edited by RBI; 10-26-2008 at 05:17 PM. Reason: Uploaded wrong file

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Had to change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    and make sure there was a workbook called book2 open, but it seemed to run through. Can you use the debug, step through the code and see just where it is not actioning???

    rylo

  3. #3
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387
    RBI,

    Please Login or Register  to view this content.
    [LIST=1]When I stepped thru the code in the VB Editor, I noticed that after finishing that the VB "Design Mode" icon was active.
    1. When I ran your original code, with CTRL+SHIFT+Q it failed.

    If you run the macro "History_D":
    Tolls, Macros, Macros..., and pick the "History_D" macro, and click on the "Run" button.


    The attached workbook has a command button, please use this button to activate the macro.


    And, have "Book2.xls" open!!!!

    Please Login or Register  to view this content.


    Have a great day,
    Stan
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-13-2008
    Location
    Barrie, ON, CA
    Posts
    47

    Thanks

    Thanks Stanley Huge Help!!!

    Can you (Or anyone for that manor) Explain tho what how that "LC&" Variable
    Works, I fairly new to VBA and I just wanted to know how that trick works.. What is the * represent??

    I know it is retreiving the last cell cell of the data range but i don't understand how..

    Thanks

  5. #5
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387
    RBI,

    Explain tho what how that "LC&" Variable

    "LC&" is a short way to define a variable in a macro.

    You could use:
    Dim LastColumn As Long
    or
    Din lngLastColumn As Long
    or
    LC&

    The "&" stands for the Long data type.

    ' Dim x% ' As Integer
    ' Dim LR& ' As Long
    ' Dim Dollars# ' As Double
    ' Dim Test$ ' As String


    Have a great day,
    Stan
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1