+ Reply to Thread
Results 1 to 4 of 4

Unlocking Workbook to Print with Macro Issue

  1. #1
    Registered User
    Join Date
    09-25-2012
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2013
    Posts
    62

    Unlocking Workbook to Print with Macro Issue

    Greetings Peeps who actually know Excel!

    I am back yet again with another issue.
    The user form I have hacked together works fine until I try to protect the workbook (I do not want anyone to be able to unhide, any sheets).
    All the code I have found and tried just creates additional issues and bugs up my Close macro.

    The workbook I have attached creates a list of tools used to inspect a job...it works as follows.

    Sheet1 A1 input 173 and enter, input an X in column C to choose a tool, fill in part #, Job# (Saved PDF Name), then close.

    On close a PDF is created and saved to a file.

    Temporary password = MAYDAY

    Any and all help is always appreciated !!
    Slide1
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Unlocking Workbook to Print with Macro Issue

    Quote Originally Posted by SLIDE1 View Post
    The user form I have hacked together works fine until I try to protect the workbook (I do not want anyone to be able to unhide, any sheets).
    All the code I have found and tried just creates additional issues and bugs up my Close macro.
    What additional issues are you having? What code have you found and tried?

    You can 'hide' sheets from view, and prevent them from being unhidden, by using a Workbook Open event and setting Sheet(X).Visible = xlVeryHidden and UserInterfaceOnly:= True

    That way the hidden sheets won't show if you right click a sheet tab and select unhide, yet any VBA you have can perform actions on hidden/protected sheets without issue.

    BSB

  3. #3
    Registered User
    Join Date
    09-25-2012
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2013
    Posts
    62

    Re: Unlocking Workbook to Print with Macro Issue

    Thanks BSB..once again after a bit of research I was able to make it work.
    Your direction was spot on with the xlVeryHidden suggestion!

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Unlocking Workbook to Print with Macro Issue

    Happy to help again, SLIDE

    BSB

+ 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. Unlocking a protected workbook
    By daryl83 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-04-2017, 04:53 AM
  2. [SOLVED] Unlocking workbook
    By sidean in forum Excel General
    Replies: 5
    Last Post: 10-03-2014, 09:19 AM
  3. Print Macro that can print one or both sheets of a workbook
    By 6423joel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-27-2013, 10:18 AM
  4. [SOLVED] Unlocking Workbook
    By mike02 in forum Excel General
    Replies: 2
    Last Post: 07-16-2012, 02:59 PM
  5. Macro - Print to PDF issue
    By AlexMach in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-10-2012, 07:47 PM
  6. Replies: 1
    Last Post: 10-27-2005, 06:00 PM
  7. Unlocking a workbook
    By Audubon in forum Excel General
    Replies: 7
    Last Post: 08-24-2005, 11:05 AM

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