Consulting

Results 1 to 8 of 8

Thread: Xlsm file problem

  1. #1
    VBAX Regular
    Joined
    Mar 2016
    Posts
    32
    Location

    Exclamation Xlsm file problem

    Hi everybody,
    I have a very annoying problem.

    On our server we have several folders with technical data sheets, they are all .xlsm files with macro and activeX buttons inside (made by me, excel 2013).
    They are all very similar, and filesize is about ~230kb per file.
    We are working on them since some years, and everything had gone fine until some days ago.
    We have all win10 64 and excel 2013.

    Here is what has been happening for a few days:

    If I open a file on a pc other than mine: no problem, the file opens perfectly, and saves without any problem, mantaining its size.


    If I open the same file on my pc by double clicking on file name: I can see Excel welcome screen "opening file bla bla bla.xlsm....", then everything disappear and excel closes.
    Now if I open excel by double clicking on program icon... it opens my file in recovery mode, with activeX controls disabled.

    If I open excel, and then open my file by open command, it opens fine.
    But... if I now save it, its size is reduced to something about 75 kb.

    Now, if I open the same file just saved on my pc (75kb) on another pc by double click... welcome sceen, opening bla bla bla... close.
    And if I open excel by double clicking on program icon... it opens my file in recovery mode, with activeX controls disabled.
    Instead if I open Excel and then the file (75kb) it opens fine.
    And if I save it is still ~75kb.
    Magic trick, now if I open the same file back on my pc from within excel or by double clicking....excel shows welcome screen and then closes!

    Ok, re-reading it is quite a mess, but the meaning is that I have a problem which I cannot solve.
    I tried a lot of different solutions, also a deep recover of Office, but nothing worked.

    Any idea...?

  2. #2
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    hi.
    the only thing i can recommend is to take a look at this page:
    https://www.jkp-ads.com/articles/sta...lComments=True
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    I've found that Rob Bovey's code cleaner can solve a lot of that sort of thing

    Worth a try

    http://www.appspro.com/Utilities/CodeCleaner.htm

    It only works with 32 bit office, but you can manually export / import if you have to
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  4. #4
    VBAX Regular
    Joined
    Mar 2016
    Posts
    32
    Location
    Tryed everything, nothing works!

    Quote Originally Posted by Paul_Hossler View Post
    I've found that Rob Bovey's code cleaner can solve a lot of that sort of thing
    Worth a try
    http://www.appspro.com/Utilities/CodeCleaner.htm
    It only works with 32 bit office, but you can manually export / import if you have to
    Sorry, but I did not understand how to and where import (and what...)

    I will try to completely uninstall and reinstall office... and if this does not work as well... do I really have to reinstall Win???

  5. #5
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    Look at #12 in

    http://www.vbaexpress.com/forum/show...ry-simple-code



    You did try to repair Office, but I doubt that reinstalling Windows would help

    If you want, post the troublesome file here and people will try to see if there's any visible issues


    Are you running 64 bit or 32 bit Office? What about the other people?
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  6. #6
    VBAX Regular
    Joined
    Mar 2016
    Posts
    32
    Location
    Hi Paul,
    everyone here in running Office 2013 64 bit on Win10 Pro.

    I just tried to clean code with Ribbon commander, it reduced file size, ok, but the problem still persists.

    Here I upload a zip file containing a my files.
    I cannot upload a single file without modifying all references in my macro, sorry. Thi is basically the tree:

    • DATASHEET TEST
    • DataBase
    • SCHEDE_v3.xlam.................................................xlam file containing macroes
    • PDF - ORDINI..............................................................auto saved PDF of orders
    • 2020
    • CUSTOMER_1
    • PDF - SCHEDE CLIENTE................................................auto saved PDF of customer sheets
    • CUSTOMER_1
    • PDF - SCHEDE TECNICHE..............................................auto saved PDF of data sheets
    • CUSTOMER_1
    • SCHEDE
    • CUSTOMER_1
    • DS00000010 - Test Datasheet 10.xlsm...........actual files to work on
    • DS00000011 - Test Datasheet 11.xlsm
    • DS00000012 - Test Datasheet 12.xlsm
    • ......


    File DS00000010 - Test Datasheet 10.xlsm have 3 sheets with activex buttons:

    • SCHEDA TECNICA
    • "RESET" will execute startup code
    • "MODIFY DATA" will open a dialog where to modify basic datasheet data
    • "FILL DATA" will open a dialog and then give you an error, because I did not attach material database
    • "ORDER" will open a dialog to fill a order
    • SCHEDA PREZZO
    • "MANUFACTURE FILL" will open a dialog and then give you an error, because I did not attach manufacturing database
    • SCHEDA CLIENTE
    • "CUSTOMER SHEET" will open a dialog and then give you an error, because I did not attach material database


    Obviously it is necessary to add a reference to SCHEDE_v3.xlam.

    It is really possible that you will find strange code... I'm not a coder at all, and I learned vb some years ago by doing this project... so be gentle!
    Attached Files Attached Files

  7. #7
    VBAX Regular
    Joined
    Mar 2016
    Posts
    32
    Location
    So... no idea?

  8. #8
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,638
    Check in the VBEditor in the tab Extra, the option 'references'.
    Probably one or more is/are missing.

    Avoid protection in VBA.
    Avoid Application.enableevents=false
    Avoid public variables

Posting Permissions

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