+ Reply to Thread
Results 1 to 8 of 8

Macro assistance w/changing URL date link

Hybrid View

stangz71 Macro assistance w/changing... 07-28-2014, 07:51 PM
shg Re: Macro assistance... 07-28-2014, 07:54 PM
stangz71 Re: Macro assistance... 07-28-2014, 08:24 PM
shg Re: Macro assistance... 07-29-2014, 12:08 AM
stangz71 Re: Macro assistance... 07-29-2014, 12:16 AM
shg Re: Macro assistance... 07-29-2014, 12:33 AM
stangz71 Re: Macro assistance... 07-29-2014, 11:08 AM
shg Re: Macro assistance... 07-29-2014, 11:24 AM
  1. #1
    Registered User
    Join Date
    07-19-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Macro assistance w/changing URL date link

    I have a macro that will go out to a website and search for a serial number. Once it finds the serial number, it will click on a link with a date on it. Once it opens up the new window, it copies all of the data and sends it back to Excel. The problem is that the date changes each day and cannot get the macro to click on the updated date link, any ideas?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Macro assistance w/changing URL date link

    Post your code that works for a particular date.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    07-19-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Re: Macro assistance w/changing URL date link

    I had to change the serial number information and changed the website to test.com because it is an internal website, otherwise, everything else is the same. The issue is the "asupid=86857319" that changes each day but it shows up as a date you can click. If there is a way to click the new date each day and bypass the ID, that would also fix the issue. Any help would be appreciated, thanks.
    ============================================================================

    Sub Serial_ASUP_Information()
    '
    ' Serial_ASUP_Information Macro
    '

    '
    Cells.Select
    Selection.QueryTable.Delete
    Selection.ClearContents
    Sheets("2Fxxxxxxxx").Select
    Sheets("2Fxxxxxxxx").Name = "2Fxxxxxxxx"
    Range("A1").Select
    With ActiveSheet.QueryTables.Add(Connection:= _
    "URL;https://test.com/AssetDashboard/asups/showAsup?asupid=86857319" _
    , Destination:=Range("$A$1"))
    .Name = "showAsup?asupid=86857319"
    .FieldNames = True
    .RowNumbers = False
    .FillAdjacentFormulas = False
    .PreserveFormatting = True
    .RefreshOnFileOpen = False
    .BackgroundQuery = True
    .RefreshStyle = xlInsertDeleteCells
    .SavePassword = False
    .SaveData = True
    .AdjustColumnWidth = True
    .RefreshPeriod = 0
    .WebSelectionType = xlEntirePage
    .WebFormatting = xlWebFormattingNone
    .WebPreFormattedTextToColumns = True
    .WebConsecutiveDelimitersAsOne = True
    .WebSingleBlockTextImport = False
    .WebDisableDateRecognition = False
    .WebDisableRedirections = False
    .Refresh BackgroundQuery:=False
    End With
    End Sub
    Last edited by stangz71; 07-28-2014 at 11:16 PM.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Macro assistance w/changing URL date link

    "asupid=86857319"
    How is the date embedded in that?

  5. #5
    Registered User
    Join Date
    07-19-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Re: Macro assistance w/changing URL date link

    2014-07-28_21-12-29.jpg

    Attached is an image on the information I have on the connection between the link and the ID. The ASUP ID comes up when I hover my mouse cursor over the date.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Macro assistance w/changing URL date link

    Can you explain that in sentences?

  7. #7
    Registered User
    Join Date
    07-19-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Re: Macro assistance w/changing URL date link

    I found out today that the number is random so I cannot correlate the ASUP ID and the date. Unless you have a trick up your sleeves, it's not going to be possible.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Macro assistance w/changing URL date link

    Nope, no tricks here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Changing the format of a date in a link from one workbook to another
    By bevski14 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-03-2014, 10:29 AM
  2. Change Link Macro (being used twice) is changing output to an incorrect path
    By Welrod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-27-2013, 02:30 PM
  3. Macro not changing link for opening balance as I run macro in different sheets
    By st_judeu@yahoo.com in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-28-2013, 05:40 AM
  4. assistance in changing data in one column based on another
    By pgalgiani in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-28-2012, 10:39 AM
  5. Assistance needed with case statement changing cell and font colors
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2009, 10:50 AM

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