+ Reply to Thread
Results 1 to 10 of 10

update worksheets using a button in a mastersheet,

  1. #1
    Registered User
    Join Date
    05-22-2012
    Location
    philippines
    MS-Off Ver
    Excel 2003
    Posts
    7

    update worksheets using a button in a mastersheet,

    hi everyone!
    cherry here..

    i was asked to create a REQUEST HANDLING SYSTEM in ms excel.
    i'm having a problem regarding updating worksheets.
    i have a mastersheet(MAIN) that has checkboxes, and buttons ("refresh worksheets" and "done checking").
    every transaction is equivalent to one row, it can accommodate multiple items trough checking the textboxes, then clicking the "done checking" button. the transaction must appear in its corresponding sheet.
    see attachment below...

    my problem is everytime i click the button, all the rows was copied to the other sheet instead of the current row only. also i found out hours ago that my code does not update but copy only...
    badly needed to finish this before weekends.
    thanks in advance and God bless..


    (sorry for my english...)
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: update worksheets using a button in a mastersheet,

    Where are the checkboxes for the rows? Once a row is copied, do you want it to be deleted from the MAIN sheet?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    05-22-2012
    Location
    philippines
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: update worksheets using a button in a mastersheet,

    i placed the checkboxes in column I in the main sheet. first row..

  4. #4
    Registered User
    Join Date
    05-22-2012
    Location
    philippines
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: update worksheets using a button in a mastersheet,

    here's my pseudocode...

    'from mastersheet, adding query to
    'corresponding sheets using checkboxes
    'click "done checking" button after every query
    --------------------------------------------------------
    loop until next row = ""
    if cpu_textbox.value = true then
    copy row to CPU sheet
    CPU_row = CPU_row +1 ' nxt line in CPU sheet
    elseif monitor_textbox.value = true then
    copy row to monitor sheet
    monitor_row = monitor_row + 1
    ...
    end if
    mainsheet_row = mainsheet_row + 1
    end loop
    --------------------------------------------------------
    'update transaction from mastersheet, any
    'changes in cells must appear in other sheets
    'click the row then click the update button
    --------------------------------------------------------
    entirerow.select
    open each sheet
    loop for every row in other sheet
    if masterSheet.cell(A,x) = otherSheet.cell(A,row#) Then
    clear the row
    insert updated row
    end if
    end loop

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: update worksheets using a button in a mastersheet,

    So if you click on the checkboxes in the 1st row, you want it to be matched with the description field and action accordingly?

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: update worksheets using a button in a mastersheet,

    Once a row is copied, do you want it to be deleted from the MAIN sheet?

  7. #7
    Registered User
    Join Date
    05-22-2012
    Location
    philippines
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: update worksheets using a button in a mastersheet,

    nope, i don't want to delete that row from the mastersheet. i am already done copying the data from MasterSheet to other sheet. but the problem is, I only want the current row to be copied and not all the rows from row 5 and onwards...

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: update worksheets using a button in a mastersheet,

    How do you identify which is the current row? Will the cursor be placed there before clicking the macro button? Or is it the last row of data that is filled in?

  9. #9
    Registered User
    Join Date
    05-22-2012
    Location
    philippines
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: update worksheets using a button in a mastersheet,

    sorry if it is not clear, the current row is the last row in the sheet, i mean every after inputting in the row, the done clicking button must be clicked.

  10. #10
    Registered User
    Join Date
    05-22-2012
    Location
    philippines
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: update worksheets using a button in a mastersheet,

    never mind, i already solved it.. tnx for your immediate reply..
    i really appreciated it.. God bless...
    ^_____________^
    Attached Files Attached Files

+ 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