+ Reply to Thread
Results 1 to 3 of 3

Input Userform Data into Specific Cells & Loop?

  1. #1
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Input Userform Data into Specific Cells & Loop?

    Hi, What am i doing worng here? In my attached sheet i will keep "Category" and "Customer" cells B1 and B2 there and there will be no more cells in thise rows filled in.....

    What i want to do is add the user form input in to the cells highlighted and repear to add into the next column. Im sure i have wrote this code incorrectly or have somehting in there that shouldnt be, but no matter how many times i change it, it will just keep overwriting the data in column B?

    Can anyone help me please?UserForm.xlsm

    'Determine emptyRow
    Dim Cellcheck
    Cellcheck = "Dummy"
    emptyRow = 1
    Do Until Cellcheck = ""
    Cellcheck = Cells(1, emptyRow)
    emptyRow = emptyRow + 1
    Loop
    emptyRow = emptyRow - 1

    'Export Data to Worksheet
    Cells(6, emptyRow - 1).Value = product.Value
    Cells(8, emptyRow - 1).Value = salespart.Value

    If casesin.Value = True Then Cells(17, emptyRow - 1).Value = casesin.Value

    If casesout.Value = True Then Cells(22, emptyRow - 1).Value = casesout.Value

    If purchaseprice.Value = True Then Cells(25, emptyRow - 1).Value = purchaseprice.Value

    If salesprice.Value = True Then Cells(39, emptyRow - 1).Value = salesprice.Value

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,124

    Re: Input Userform Data into Specific Cells & Loop?

    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

  3. #3
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Re: Input Userform Data into Specific Cells & Loop?

    Fantastic!! Thanks

+ 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