+ Reply to Thread
Results 1 to 10 of 10

Active Buttons required

  1. #1
    Forum Contributor
    Join Date
    03-23-2007
    Location
    Essex, UK
    MS-Off Ver
    Office Pro 2010
    Posts
    275

    Active Buttons required

    Well im back for another lesson on VBA. Ive tried to get this to work from what I've learnt in previous posts but I just keep screwing it up, so I have included the workbook with the buttons added but not active. What I need is some help on how to get them to do what I want.

    The buttons are located on the PFM Tracker sheet with what I need them to do. In addition I'll give you a breakdown of what is required.

    Currently when the workbook is opened the user is forced to activate the macros. One of these macros disables the Cut, Copy Paste features within Excel. I need the first button 'Enable Copy' to request a password for activation and once entered the Cut, Copy, Paste feature to be enabled. Then when finished the 2nd button 'Disable Copy' when clicked to re-activate the Cut, Copy, Paste Disabled macro.

    Hope that explains it. I have left the PFM Tracker sheet unprotected for who ever wants to play with it. (Not that protection would stop some)

  2. #2
    Forum Contributor
    Join Date
    03-23-2007
    Location
    Essex, UK
    MS-Off Ver
    Office Pro 2010
    Posts
    275
    Bump..please ppl i need to get this to work

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482
    Quote Originally Posted by ukphoenix
    Bump..please ppl i need to get this to work
    Hi,
    Can't you just protect the sheet, then un-protect it to modify?
    Please Login or Register  to view this content.
    Last edited by davesexcel; 07-06-2008 at 11:24 AM.

  4. #4
    Forum Contributor
    Join Date
    03-23-2007
    Location
    Essex, UK
    MS-Off Ver
    Office Pro 2010
    Posts
    275
    I can see what your trying to do by unprotecting on the click of the button but this will not reverse the macro that disables the 'Cut Copy Paste' feature. This feature also needs to be re-enabled afterwards.

    The reason I need these buttons are that I need to copy some of the data once the sheet is completed. But what I dont want is for the workbook to be left with the copy, paste feature available so that any old Joe can start tampering, hence the fairly heavy measures taken.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Why not have your code check Environ("username"), and if it's you, don't disable cut and paste?

    BTW, don't forget to undo the disable when the workbook is deactivated (i.e., when users switch to another workbook in the same instance of Excel).

  6. #6
    Forum Contributor
    Join Date
    03-23-2007
    Location
    Essex, UK
    MS-Off Ver
    Office Pro 2010
    Posts
    275
    Quote Originally Posted by shg
    Why not have your code check Environ("username"), and if it's you, don't disable cut and paste?

    BTW, don't forget to undo the disable when the workbook is deactivated (i.e., when users switch to another workbook in the same instance of Excel).
    Being a novice I aint got a clue how too...lol......example please

  7. #7
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482
    Quote Originally Posted by ukphoenix
    Being a novice I aint got a clue how too...lol......example please
    It looks like you want to extract specific data to another sheet, you should control what the user wants to extract, instead of letting them copy and paste to another sheet themselves.

  8. #8
    Forum Contributor
    Join Date
    03-23-2007
    Location
    Essex, UK
    MS-Off Ver
    Office Pro 2010
    Posts
    275
    We thought of doing this but the sheet works over 3 different shifts and the name changes daily making it almost impossible to control. So we came up with the idea if we had buttons that could enable and disable the functions then the top dog could enter the sheets and extract only the data he required.

  9. #9
    Forum Contributor
    Join Date
    03-23-2007
    Location
    Essex, UK
    MS-Off Ver
    Office Pro 2010
    Posts
    275
    Could really do with some help here guys....in an earlier post ive explained as to what i require..I welcome an easier way of doing it but as of yet have no real ideas.

    In a nutshell I need the enable copy button to request a password and once entered to enable the cut, copy, paste feature. When done a click of the second button then disables the cut, copy, paste feature until the password is again entered on the click of the first button.

  10. #10
    Forum Contributor
    Join Date
    03-23-2007
    Location
    Essex, UK
    MS-Off Ver
    Office Pro 2010
    Posts
    275
    All help seems to have stopped in the forum at the moment...cant believe someone cant give me the coding for the buttons with the enabling one being password protected.
    Everything ive tried keeps throwing back errors

+ 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