+ Reply to Thread
Results 1 to 6 of 6

Restricting the usage of sheet

Hybrid View

  1. #1
    Registered User
    Join Date
    10-29-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    Restricting the usage of sheet

    I am looking out for code for locking a sheet but the code
    placed in the different sheet, may be sheet2 and should be effective
    in the sheet named Demo. The reason being there are many imp
    formulas at various locations in Demo sheet.
    In sheet named Demo I want to set the locking based on the number
    set in cell C8. C8 does not have any formula.
    Say I start the number from 1001 in cell C8.
    The starting number can be any number. This is just an example.
    I want three options in the code.

    1) From some number x started in C8 the sheet should stop working
    when the code reaches to x+7000
    2)It starts prompting a message like
    YOUR SHEET IS ABOUT TO EXPIRE. CONTACT SYSTEM DEPT.
    when the number reaches x+6500
    3)Also when it reaches x+7000 and I want to allow to continue further
    more 7000 then I can do that i.e in C8 it will continue from 8001.

    The third option is just a thought. If not possible then in the code somewhere
    I can mention the same number that I mention in C8 and it continues further
    more. Or pressing some set of ctrl+keys it resets the counter for further 7000
    and continues which only I am aware of.

    Thanks
    Kiran

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Restricting the usage of sheet

    Quote Originally Posted by Kiran Mambi View Post
    1) From some number x started in C8 the sheet should stop working
    when the code reaches to x+7000
    it's not clear for me, what code ? need a sample file
    If solved remember to mark Thread as solved

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Restricting the usage of sheet

    Hi, Kiran Mambi,

    I am looking out for code for locking a sheet but the code placed in the different sheet, may be sheet2 and should be effective in the sheet named Demo.
    AFAIK itīs not possible.

    Say I start the number from 1001 in cell C8.
    You should consider using a hidden sheet, a custom builtindocumentproperty, a name, a text file for saving the value.

    Excel is not a safe application when it comes to protecting your code, no matter what you try. You would need to incorporate a third party tool or use VB/VS to program.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    10-29-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Restricting the usage of sheet

    Hello
    patel45 & HaHoBe

    x is just any number from where I want the code to start counting.
    what is the third party tool or use VB/VS to program and does it help in solving the problem.

    thanks
    Kiran

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Restricting the usage of sheet

    Hi, Kiran Mambi,

    Third party Tools are helpers which try to overcome the poor safety of Excel by encrypting the contents and just allow them to be opened with that software/password/keys.

    Visual Studio and Visual Basic are programming languages which will allow applications to run without a host as is the normal behaviour of VBA.

    I doubt that sharing the workbook will not really work with either of these programs to well. For me the best way to overvcome this is to use a RDBS for this kind of work and Excel only being the frontend if needed.

    Ciao,
    Holger

  6. #6
    Registered User
    Join Date
    10-29-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Restricting the usage of sheet

    For the time being if I compromise and try for the first point
    (i.e the sheet gets blocked after the counter reaches x+7000)
    and to be used in the same Demo sheet then is it possible.
    Also if you can suggest me some better option.

    Thanks
    Kiran

+ 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. Workbook usage or Database usage assistance
    By Sunshine601 in forum Excel General
    Replies: 4
    Last Post: 12-12-2013, 08:36 AM
  2. [SOLVED] Restricting the user form to adding to excel sheet
    By shiftyspina in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-24-2013, 07:41 AM
  3. Remove automatic sheet protection after macro usage
    By aluKiller in forum Excel General
    Replies: 1
    Last Post: 07-05-2012, 08:12 PM
  4. Calculating usage of drop-down choices on separate sheet
    By BlondOIverBlue in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-27-2011, 09:12 PM
  5. Restricting Macro to Selected Sheet
    By zimbo109 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-23-2010, 05:18 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