Consulting

Results 1 to 2 of 2

Thread: Run-time error '9' Problem

  1. #1
    VBAX Newbie
    Joined
    Aug 2010
    Posts
    4
    Location

    Run-time error '9' Problem

    I'm linking a particular cell with a hyperlink that is date specific, so when I change the date I'm looking up data for I would like to pull up the website to the particular day. Here is the code:

    [VBA]Private Sub Update_All_Savings()
    Dim Hyperlink_Change As String

    Application.Run ("OpenCalendar()") This is where the date is changed
    Production_Day = Range("BZ1").Value
    Calculate
    Hyperlink_Change = Range("CC1").Value Cell CC1 contains the concatenation equation that comes up with the date specific website address
    Application.ScreenUpdating = False
    Application.DisplayAlerts = False
    Selection.Hyperlinks(1).Address = Hyperlink_Change
    'Hyperlinks (1) is the previous dates hypelink[/VBA]

    When stepping through the macro here I get the Run-time error '9' Subscript out of Range

    Any clues to my mistake?
    Last edited by Bob Phillips; 11-22-2010 at 02:08 PM. Reason: Added VBA Tags

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Where do you get the error?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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