+ Reply to Thread
Results 1 to 1 of 1

Run-Time Error 438 when saving

Hybrid View

  1. #1
    Registered User
    Join Date
    06-29-2011
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel for Mac 2011
    Posts
    1

    Run-Time Error 438 when saving

    I've set up a button to save the workbook. I needed to force users to use the button and not bypass it by using the save or save as options on the menu. So I created a public variable in one of the modules called Ok2Save. When the button is used the variable is set to 1 just before saving then back to zero after the save.
    In ThisWorkbook I created a BeforeSave routine that checks the public variable. If it is zero it cancels the save end exits.
    Here is the code in the BeforeSave:
    If Ok2Save = 0 Then
        MsgBox "These save functions have been disabled.  Use the SAVE ESTIMATE or SAVE THIS WORKBOOK buttons as applicable."
        Cancel = True
        Exit Sub
    End If

    It was working initially but after closing and re-opening the spreadsheet I now get an error 438 "Object doesn't support this property or method."

    it highlights the first line of the code. When I check the variable it is set to 1 as it should be. So the global variable is set properly.

    Why am I getting this error?
    Last edited by Leith Ross; 06-29-2011 at 06:04 PM. Reason: Added Code Tags

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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