+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    11-07-2007
    Posts
    9

    Read-only error using Form Button with Assign Macro

    Hi all - second question in two days. After the helpful response of my last question I am hoping somebody can solve this presumably simple problem I'm having.

    I have assigned a macro to take text from cells and paste it into a text document. The macro works fine when I go through the Macros menu and run it. I would like to have a button that can be pressed once to run the macro however so far I have been getting problems. As I have many of the same macro just with different cell references, I have about 27 different buttons... the 'custom command button' option isn't really an option due to this as from what I gather I can only assign one macro to it.

    What I've done so far is create a blank "Button" from the Form toolbar, right clicked it and chosen to 'Assign Macro'. Now when I try and click it, I get the following error (which will probably be very common to you guys):

    file.xls is locked for editing

    by SamF88

    Open 'Read-Only' or, click 'Notify' to open read-only and receive notification when the document is no longer in use.


    I'm guessing this is a problem that is easy to solve, but unfortunately my search has proven difficult what with searching these terms bringing up hundreds of different unrelated links.

    All I want is for the Form button to do exactly the same as when I click Run Macro. No errors or messages, just running the macro.

    Hopefully somebody can help me! It would be much appreciated.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & read 2007
    Posts
    15,497
    Hello samf88,

    For anyone to really assess your problem, you should zip your workbook, and post it.

    Thanks,
    Leith Ross

  3. #3
    Registered User
    Join Date
    11-07-2007
    Posts
    9
    That might take a while... I will have a LOT of confidential information to remove first... hehe.

  4. #4
    Registered User
    Join Date
    11-07-2007
    Posts
    9
    Well, I've just gone and taken all of the confidential information out and only left 1 macro button in, and the button works now... so why when I had 27 did it bring up a read only error? I've attached the .zip with it in anyway, hopefully somebody can work out why it does this. Thanks!
    Attached Files Attached Files

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.2.0