+ Reply to Thread
Results 1 to 5 of 5

Populate data in userform and edit

Hybrid View

  1. #1
    Registered User
    Join Date
    07-13-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    26

    Populate data in userform and edit

    I have created a user form
    UserForm1
    for daily expenses entry. the form populate data into two different worksheets "Database" and "I&E" working perfectly. Now i want to give an administrative right to some user to edit the data.
     Userform3
    is used for the password and makes visible
    combobox1
    . this combobox is for populate data again to the userform based on vauchar no.

    With my little knowledge I can populate some of the data to the userform but as per as the option Buttons are concerned i am stuck. In
    Uaserform1
    if
     optionbutton1
    is selected it populates "cash" in 'Mode' column in Database worksheet so if column Mode (I) is "cash" I want
     OptionButton1
    to be selected, else if Mode column is "Cheque"
    OptionButton2
    will be selected with
    Textbox6
    &
    Combobox4
    visible with the cheque No and Bank name from column 'J' & 'K'.
    Secondly
     Commandbutton6
    is for update the data. Can any one help me with the code to update the data in to
    worksheets ("Database")
    and
    worksheets ("I&E")
    Thanks in advance.
    is there any way to protect the Worksheets so that no entry or modification should be done directly but through usrtform.
    My
    Userform2
    is for new entry of catagories

    T
    hanks again.
    please see the attachment

  2. #2
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Re: Populate data in userform and edit

    Sub ProtectOpenMacro()
    ActiveSheet.Protect Password:="password", userinterfaceonly:=True
    
    End Sub
    Use this macro - then sheet will be protected but macros can write into it. (Run the macro then save).

  3. #3
    Registered User
    Join Date
    07-13-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Populate data in userform and edit

    Thanks Crimedog

    It is working perfectly. I am more concern about the edit part. can you please see to it .

    Regards
    Surajit

  4. #4
    Registered User
    Join Date
    07-13-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Populate data in userform and edit

    dear crimedog,
    any help?

  5. #5
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Re: Populate data in userform and edit

    I am not sure what edit you mean. it does allow your user forms to write into the workbook.

    Edit
    I see now - administrative rights
    highlight the ranges you want them to edit - then choose "allow users to edit" in the review tab. Establish a seperate password for them.
    Now when they begin to type into one of the cells: a dialogue box will open requesting a password. Once they have unlocked the range, it will remain unlocked until they save and close.

    You can set up multiple ranges with multiple passwords

    The main password will remain in effect.
    Last edited by CRIMEDOG; 09-13-2012 at 09:15 AM.

+ Reply to Thread

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