+ Reply to Thread
Results 1 to 5 of 5

Need your help in Write VBA Coding

  1. #1
    Registered User
    Join Date
    04-08-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    50

    Need your help in Write VBA Coding

    Dear All,

    There are five sheets in my Excel Book. And this is testing file. What I want is, while opening the file, a pop should open and ask for input. "P" , "G" & "CONTROL" is the input command.

    Sheet Name in this Testing Excel Book : Sheet1, Sheet2, Sheet3, Sheet4, Sheet5

    1. If I give "P", Excel sheet should open with Sheet1, Sheet3, Sheet4, Sheet5

    (Sheet 2 need to be auto hided)


    2. If I give "G", Excel sheet should open with Sheet1, Sheet2, Sheet4, Sheet5

    (Sheet 3 need to be auto hided)

    3. If I give "CONTROL" as a password, then all the sheets should appear.

    Regards
    Balamurugan
    Attached Files Attached Files

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Need your help in Write VBA Coding

    something like this?
    Attached Files Attached Files
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: Need your help in Write VBA Coding

    Slightly different approach.

    In regular module.
    Please Login or Register  to view this content.
    In Workbook module.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-08-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Need your help in Write VBA Coding

    Thanks for your great support. One additional option is required. Once if I opened with any one of "P" & "G", then I should not be allowed to see the VBA coding screen as well as I should not be allowed to hide or unhide any of my available sheets.

    Only if opened with "CONTROL" then I can see the VBA coding as well as I do hide or unhide sheets.

    And also when user open the Sheet with "P" & "G", then he or she should not be allowed to save with same file. Even if he tries to save the file system should prompt him to save as the file.

    Only if opened with "CONTROL" then only user should be allowed to do the all the changes.
    Last edited by BALA1983; 01-31-2017 at 12:01 PM. Reason: Addition Points

  5. #5
    Registered User
    Join Date
    04-08-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Need your help in Write VBA Coding

    Thanks for your great support. One additional option is required. Once if I opened with any one of "P" & "G", then I should not be allowed to see the VBA coding screen as well as I should not be allowed to hide or unhide any of my available sheets.

    Only if opened with "CONTROL" then I can see the VBA coding as well as I do hide or unhide sheets.

    And also when user open the Sheet with "P" & "G", then he or she should not be allowed to save with same file. Even if he tries to save the file, system should prompt him to save as the file.

    Only if opened with "CONTROL" then only user should be allowed to do the all the changes.

+ 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. How to write VBA coding for IF/ELSE Statement
    By Ankit_Kumar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2015, 04:02 AM
  2. Replies: 2
    Last Post: 01-26-2015, 04:53 AM
  3. [SOLVED] how to write a macro coding to calculate data from the last month data??
    By mastercl90 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-21-2014, 06:39 AM
  4. Reminder request - "write vba coding on buttons to active attached user form"
    By virgome in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2013, 05:14 AM
  5. [SOLVED] having issue coding a form to write data to cells
    By dpandk in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-08-2012, 11:28 AM
  6. Howto write the looping coding between worksheets and workbooks?
    By cboys00 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-11-2012, 07:17 AM
  7. how to write coding can make the browse button can select multiple choices
    By ccs_1981 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2008, 01:37 PM

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