+ Reply to Thread
Results 1 to 4 of 4

Macro to open workbooks and resize columns not working

  1. #1
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Macro to open workbooks and resize columns not working

    Hi, I have the following code to open each workbook in a directory and then to call a macro to resize the columns, however it is not working (no error messages, just nothing happening):

    Please Login or Register  to view this content.
    Resize macro is here:

    Please Login or Register  to view this content.
    Is there something I have missed with this?

    Thanks

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: Macro to open workbooks and resize columns not working

    Not sure if this will make a difference, but change this line

    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Macro to open workbooks and resize columns not working

    I got your macro to open the files with your original syntax but it wouldn't call the sub routine 'resize' but if I replaced
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.
    ( you don't need the .select line)
    then it seemed to work
    Happy with my advice? Click on the * reputation button below

  4. #4
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Re: Macro to open workbooks and resize columns not working

    thank you. It worked and I also changed to files to .xls which worked as well.

+ 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. open all workbooks not working
    By ammartino44 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2015, 05:47 PM
  2. [SOLVED] Dir () , Workbooks.Open stopped working
    By vlookup. in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-28-2015, 05:25 PM
  3. [SOLVED] workbooks.open not working in xl2010 but works in xs2003
    By symaxf in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-13-2013, 11:35 PM
  4. Defining workbook variable not working with workbooks.open
    By hmbugg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2013, 02:09 PM
  5. Macro to close all open workbooks save two not working
    By drajanm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2011, 05:58 AM
  6. Private Sub Worksheet_Change stops working when I have certain workbooks open.
    By forth250 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-12-2008, 03:47 PM
  7. [SOLVED] Problem with Macro working in new workbooks that I open
    By chris_rip in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-29-2005, 03: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