Results 1 to 9 of 9

Would like to hide specific text inside macro vba code

Threaded View

keisen Would like to hide specific... 10-16-2012, 11:10 AM
Kyle123 Re: Would like to hide... 10-16-2012, 11:12 AM
keisen Re: Would like to hide... 10-16-2012, 11:22 AM
keisen Re: Would like to hide... 10-16-2012, 11:44 AM
Richard Buttrey Re: Would like to hide... 10-16-2012, 11:16 AM
keisen Re: Would like to hide... 10-16-2012, 11:26 AM
Norie Re: Would like to hide... 10-16-2012, 11:30 AM
keisen Re: Would like to hide... 10-16-2012, 11:48 AM
stuzor Re: Would like to hide... 03-24-2015, 07:08 PM
  1. #1
    Registered User
    Join Date
    10-16-2012
    Location
    ma
    MS-Off Ver
    Excel 2003
    Posts
    5

    Question Would like to hide specific text inside macro vba code

    Working on an Excel document that has several password-protected tabs (i.e. worksheets). These "protected" tabs include working macros with code that effectively unprotects the tab, runs the macro, and then re-protects the tab before exiting.

    Here's a sample:
    _________________

    Sub sort()
    '
    ' sort Macro
    ' Macro recorded 12/15/02 by Administrator
    '
    ' Keyboard Shortcut: Ctrl+p
    '
    ActiveSheet.Unprotect Password:="1234"
        Range("C3:D23").Select
        ActiveWindow.LargeScroll Down:=-2
        Selection.sort Key1:=Range("c3"), Order1:=xlAscending, Header:=xlGuess, _
            OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
    ActiveSheet.Protect Password:="1234"
    End Sub
    _________________


    If possible, I'd like to HIDE the 2 lines of code above that make reference to the password. Is there any way to change a line of code's text color to match the background color, thereby making the line invisible to the reader?

    Appreciate any suggestions here.

    Thank you.

    - Kevon
    Last edited by Cutter; 10-17-2012 at 09:00 AM. Reason: Added code tags

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