+ Reply to Thread
Results 1 to 4 of 4

Open Userform from another workbook

  1. #1
    Forum Contributor
    Join Date
    11-05-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    149

    Open Userform from another workbook

    Hi,

    I am using this code that I found to open a userform from another workbook but giving me Run-time error 52 bad file name or number I know the problem is that my file is in .xlsm file format 52 and the but the vba is code 51 file format how can I modify 52 format the vba code:

    here is the code:

    Please Login or Register  to view this content.
    Thank you

  2. #2
    Registered User
    Join Date
    09-02-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    76

    Re: Open Userform from another workbook

    the vba is code 51 file format
    Code 51 is an xlsx format which means it cannot contain any code?

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,908

    Re: Open Userform from another workbook

    Also, that code will not work anyway. You need a procedure in that workbook that will show the form, then you have to call that routine.
    Rory

  4. #4
    Forum Contributor
    Join Date
    11-05-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: Open Userform from another workbook

    Thank you,

+ 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. Workbook Open event - userform gets displayed over another workbook
    By hemantparmar in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-18-2019, 11:56 AM
  2. [SOLVED] vba to open excel workbook if alrady open by other user show userform and exit sub
    By bluepomme in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-06-2018, 07:14 PM
  3. Call userform 1 from userform 2 allowing to open workbook 1 clicking button 1
    By FMontana in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-27-2015, 02:29 AM
  4. UserForm help - display list of open workbooks except workbook userform code is in
    By kensweep in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-09-2014, 12:26 PM
  5. How to Open 2nd workbook from userform, then close 2nd Userform
    By bigfoot007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-04-2012, 02:03 PM
  6. Open Userform and workbook together
    By sivdin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2009, 07:36 AM
  7. Open workbook via another workbook and not display userform
    By Khaos176 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-04-2009, 02:17 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