+ Reply to Thread
Results 1 to 4 of 4

Capturing info using VB form onto excel

  1. #1
    Registered User
    Join Date
    04-23-2007
    Posts
    8

    Capturing info using VB form onto excel

    I would be extremely grateful if any of the experts in MS Excel could help me out with my problem. I have gone through all the previous questions to find out if a similar question was raised earlier and could not spot out any. I genuinely need help with the following problem:

    I have created a user form in excel to capture information on to a particular sheet. This is done using VB6 that supports the version of MS Excel 2002 that is installed on my system. There is a command button on the sheet to which this macro has been assigned and each time the user clicks on to this button, the form opens enabling him to input information. There are three command buttons on my VB form viz. “Add new”, “Clear all” and “Exit form” in addition to other text boxes etc. Thus the form only enables the user to enter data and not to delete or edit data that has already been entered in the worksheet.

    Now, my problem is that I need to ensure that the user does not enter information directly onto the worksheet. He should do it only through the form. Also, he should not be able to edit information that has already been entered in the worksheet. In case he finds that he has made a wrong entry he should only be able to delete the entire row corresponding to that entry in the worksheet directly but resubmit the information only through the VB form. If I try to protect the worksheet so as to not allow the user to access the worksheet, the problem is that the data from the user form also does not get written onto the worksheet. How do I solve this problem?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Why are you using a VB6 form instead of an Excel UserForm?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    04-23-2007
    Posts
    8

    Any hope for help

    I am indeed using an Excel userform. Its by mistake that I have written VB6

    I have gone through the site but am not able to find the solution to my problem specifically. Will you pl guide me further on this pl.

    With regards,
    lilly
    Last edited by Lilly; 06-01-2007 at 03:18 AM.

  4. #4
    Registered User
    Join Date
    02-21-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Capturing info using VB form onto excel

    Hi Lilly
    YOu can do so simply by protecting a worksheet.Select all cells in excel worksheet that you dont want users to change.Right click and click on format cells
    In the protection select both option 1.Hidden and Locked.
    Then Protect the sheet and remember password.
    And in vb form when you want to access this sheet
    Dont forget to used Unprotect sheet with unprotect command and also mention password there.I am talking about vb 2010 .I dont know weather it works for vb 6
    IF you further need help Please email me at imti321@gmail.com

+ 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