+ Reply to Thread
Results 1 to 5 of 5

Custom Data Entry form to post to separate worksheets dependent on a variable

Hybrid View

  1. #1
    Registered User
    Join Date
    10-09-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    20

    Smile Re: Custom Data Entry form to post to seperate worksheets dependant on a variable

    OK, I have tried but I've got lost - Any chance you could have a look at the code for me - I've done everything I can but I'm limited.

    If you sort this I will be your friend for life

    Many thanks
    Attached Files Attached Files

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Custom Data Entry form to post to seperate worksheets dependant on a variable

    Here is a better example, briefly tested, but not fully developed for all of your controls on the form. This should get you going. Note that I am referencing sheet codenames and not worksheet names (matter of preference).

        Dim lrow As Long, ws As Worksheet
        
        Select Case Me.CheckBox1.Value
            Case True 'Extended Terms
                lrow = Sheet4.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
                Set ws = Sheet4
                
            Case False 'Same Terms
                lrow = Sheet2.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
                Set ws = Sheet2
        End Select
        
        With Me
            ws.Cells(lrow, 1) = .Account.Value
            ws.Cells(lrow, 2) = .Surname.Value
        End With
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Registered User
    Join Date
    10-09-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Custom Data Entry form to post to separate worksheets dependent on a variable

    That's Just Brilliant - The really good thing about this is I'm learning stuff as well - and managing to remember it for future reference- I'm also beginning to understand how the code works. Thanks so much again

+ 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