+ Reply to Thread
Results 1 to 4 of 4

Macro help - function to close and save

Hybrid View

  1. #1
    Registered User
    Join Date
    09-25-2012
    Location
    Perth, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    14

    Macro help - function to close and save

    Good Morning

    I hope you are all well.

    I am wondering if someone call help me, I have a password protected excel workbook.

    I was wondering if there was a function so that I can click the company logo and it will save and close the current worksheet when password has been inputted for editing, but just close the worksheet with no prompt to save as or over ride if opened in read only.

    If anyone could help that would great.

    Thank you so much for your help in advance.

    Have a fantastic day/night (depending where in the world you are)

    Thanks

    Jodie

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Macro help - function to close and save

    Hello jodieduncan,

    If you could upload a sample WorkBook, complete with the code and Company Logo, we would be able to put this matter of yours quickly to bed. Remember to provide us with the Password as well.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: Macro help - function to close and save

    Hi jodieduncan,

    You can try this code.
    If ThisWorkbook.ReadOnly = True Then
        ThisWorkbook.Close
    Else
        ThisWorkbook.Save
        ThisWorkbook.Close
    End If
    Regards,
    Sindhu

  4. #4
    Registered User
    Join Date
    09-25-2012
    Location
    Perth, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro help - function to close and save

    Thank you Sindhu

    Worked a treat.

    Much appreciated.


+ 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