+ Reply to Thread
Results 1 to 6 of 6

macro without workbook

  1. #1
    Registered User
    Join Date
    09-14-2009
    Location
    Prague
    MS-Off Ver
    Excel 2007
    Posts
    16

    macro without workbook

    Hi,

    I have found out that it's possible to do this:

    I have a file (A) which contains a macro and looks like a regular xls file.
    If I open this file (A) basically nothing (visible) happens.
    If I then open another excel file (workbook B) the macro (A) will appear in a module in this opened workbook.

    Could you tell me how can I create a macro without a workbook (like A)?

    I tried to export the modul where the macro is saved but then it was not possible to open the exported module...

    Thanks
    Last edited by kaipan; 10-26-2009 at 09:01 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: macro without workbook

    I for one have no idea what you mean. It's not clear whether you are saying workshee & mening workbook.

    All macros need to be contained in a workbook
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    09-14-2009
    Location
    Prague
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: macro without workbook

    Sorry, I was thinking about workbooks...

    An example:
    I have a macro which works with all opened workbooks. But I don't want the macro to work with the workbook where the macro is saved. How can I solve this?

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: macro without workbook

    Almost sounds like the first file is an addin.
    Although the code does not normally appear in the list of available macros.

    Or maybe the workbook makes itself invisble upon loading. What happens if you open the file and do not enable macros. Can you see it then?
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: macro without workbook

    You need to post the code, remember to use Code Tags

  6. #6
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,179

    Re: macro without workbook

    If the first file is an addin, will the macro run on that file?
    Regards

    Rick
    Win10, Office 365

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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