+ Reply to Thread
Results 1 to 5 of 5

Code import wont work when changed to use on .xlsm

  1. #1
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    638

    Code import wont work when changed to use on .xlsm

    When I use the code below it imports the data just fine when its .xls
    but now wont work when I use it on .xlsm

    How can I make it work



    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Code import wont work when changed to use on .xlsm

    How does it not work for xlsm files?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    638

    Re: Code import wont work when changed to use on .xlsm

    I just figured this out but on the workbooks I am trying to grab data off I have if I remove this code it works great

    Please Login or Register  to view this content.
    Everything stops when this code is in the This Workbook Object , but it is code I would like to keep because there a lot of sheets that are hidden on the sheet and if I open those workbooks it opens to the first sheet in the book.

    is that possible


    Please Login or Register  to view this content.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Code import wont work when changed to use on .xlsm

    Not sure I follow.

    Are you saying there is code in the xlsm files that you are opening that you want to keep but that code appears to be preventing you importing data from the files?

    If that's the case try temporarily disabling events, opening the workbook, doing the import then closing the workbook and enabling events.

    Something like this
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    638

    Re: Code import wont work when changed to use on .xlsm

    That seems to be working now....awesome....

    One more thing what line can I add to "disable update links" message when i open the file again.

    Brian

+ 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. Code wont work if the first cells are empty
    By KyleJackDaniels in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-08-2016, 10:10 AM
  2. [SOLVED] Code wont work in new workbook
    By richard11153 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-28-2016, 05:37 PM
  3. [SOLVED] changed the name of tabs and formulas wont work anymore?
    By loopiloo in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-29-2015, 04:38 PM
  4. Replies: 3
    Last Post: 01-27-2014, 05:06 PM
  5. Running a code at a specific hour wont work if...
    By Joaoack in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-14-2012, 03:23 PM
  6. [SOLVED] Conditional formatting code wont work
    By Robert Hargreaves in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2005, 09:40 PM
  7. Why wont this code work?
    By Mark Stephens in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2005, 02:06 PM

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