+ Reply to Thread
Results 1 to 6 of 6

Combine 2 subs

  1. #1
    Registered User
    Join Date
    08-09-2011
    Location
    SC,USA
    MS-Off Ver
    Office2003 & Office2007
    Posts
    8

    Combine 2 subs

    Hello all,
    Totally new to VBA.Found 2 subs that do what i need, but how do i combine them to work on same sheet? One sub will accumulate a cell by using 2 cells. The second sub automatically adds the date when ever i change the accumulating cell.

    Example: I am using 4 columns A,B,C,D

    Column A (Names)
    Column B (Date)
    Column C (Daily Entry)
    Column D (Total)

    C & D are the accumulating and when ever i change a cell in column C the cell in column D will accumulate and the cell in column B will update the date.
    Make sense?

    Here is first sub...
    Please Login or Register  to view this content.
    Here is second sub...

    Please Login or Register  to view this content.
    I really dont know much at all about subs, i just searched out and found these already made, but have no clue as how to combine them.

    Any help is much appreciated.
    Thanks,

    Troy
    Last edited by tday7; 10-07-2011 at 05:02 PM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Combine 2 subs

    Troy,

    Something like this?
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    08-09-2011
    Location
    SC,USA
    MS-Off Ver
    Office2003 & Office2007
    Posts
    8

    Re: Combine 2 subs

    WOW!! Not at all what i thought it would look like. No complaints thow Thanks much

    Works just like i need it.

    Troy

  4. #4
    Registered User
    Join Date
    08-09-2011
    Location
    SC,USA
    MS-Off Ver
    Office2003 & Office2007
    Posts
    8

    Re: Combine 2 subs

    I have another issue. After placing VB inside of sheet, i then try to save book and get the following window.

    I know its sumthin simple

    Any direction?

    Thanks,
    Troy
    Attached Images Attached Images

  5. #5
    Registered User
    Join Date
    08-09-2011
    Location
    SC,USA
    MS-Off Ver
    Office2003 & Office2007
    Posts
    8

    Re: Combine 2 subs

    Duh. I figured it out. How dum of me.
    Chose the .xls extension and all saves fine.

    Troy

  6. #6
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Combine 2 subs

    You can also choose the .xlsm extension. Given that you are working with Office 2007, you should choose xlsm instead of .xls because .xls is the extension for Excel 2003.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

+ 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