Results 1 to 3 of 3

Thread: Help with a macro please
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Feb 2019
    Posts
    138
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Help with a macro please

    Hi Everyone,

    The macro below is an HTML copy from a folder(file:///C:/Users/HOME/Dropbox/DAILY_SALES_REPORTS/DAY_END.HTML) and pasted to a worksheet(IMPORT_HTML). Works like a charm until the DAY_END.HTML file is overwritten which we do daily.

    The way it was recorded is to open folder (file:///C:/Users/HOME/Dropbox/DAILY_SALES_REPORTS/DAY_END.HTML), select open with
    Internet Explorer, select all, copy, close Internet Explorer and paste to cell A1 in worksheet(IMPORT_HTML).

    Not sure what the issue is so any help would be greatly appreciated.

    Thank you!!


    Code:
    Sub TEST_IMPORT()'
    ' TEST_IMPORT Macro
    '
    
    
        ActiveSheet.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:= _
            False
    
    End Sub

  2. #2
    Board Regular
    Join Date
    Feb 2012
    Location
    Florida, USA
    Posts
    11,040
    Post Thanks / Like
    Mentioned
    25 Post(s)
    Tagged
    2 Thread(s)

    Default Re: Help with a macro please

    What do you want it to do...or not do differently?
    Using Windows 10, Excel 2013.
    Any code provided by me should be tested on a copy or a mock-up of your file before applying it to your original file. Some actions generated by VBA code cannot be reversed with the undo facility in Excel. To open the VB editor, press Alt + F11. To run code from the Excel window, press Alt + F8. Please do not attempt to learn everything about VBA in one thread, especially from me. See this link for attaching images: Attachments

  3. #3
    Board Regular
    Join Date
    Feb 2019
    Posts
    138
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Help with a macro please

    Hi JLGWhiz,

    What I just discovered is the macro is loading what was most recently copied in A1 so I am going down the wrong path. What I need is a macro
    that will open the HTML in Internet Explorer, Select ALL, Copy, Close Internet Explorer and paste it in A1 in Worksheet
    IMPORT_HTML.

    The path to the HTML is
    (file:///C:/Users/HOME/Dropbox/DAILY_SALES_REPORTS/DAY_END.HTML)

    I am aware that I can import it as a linked table BUT there are 30+ tables and the workbook becomes around 5 MB and is extremely slow refreshing
    so looking for a copy/paste macro.

    Thank you!


Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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