+ Reply to Thread
Results 1 to 3 of 3

Modifying VBA to create new macro for recording data

  1. #1
    Forum Contributor
    Join Date
    02-11-2009
    Location
    Montclair, NJ
    MS-Off Ver
    Excel 365
    Posts
    236

    Modifying VBA to create new macro for recording data

    Hey,

    I talked with you guys before about this project and you helped me with some macros which worked PERFECTLY, so thank you sooooo much for that. With the VBA code from the macros, I've been trying to edit the code to make the macro perform another action. Here is the code I'm editing in "Module 1": (This code takes AC3:AC21 from "Sheet1" and records the data in the "F4 - Max" worksheets, then deletes the contents in "Sheet1")

    Please Login or Register  to view this content.

    And here is what I'm trying to create to get AD3:AD21 from "Sheet 1" to the "F4 - Avg" worksheet:


    Please Login or Register  to view this content.

    I'm not sure exactly why, but this macro isn't running when I push the "Record Data" button in "Sheet1"

    Could somebody help me out here? And if it isn't too much to ask for, an explanation on why what I'm doing isn't working.

    Thank you sooooo much for your time,
    Bob
    Attached Files Attached Files
    Last edited by sighlent1; 12-30-2009 at 09:57 AM. Reason: Was asked by guru to make title more specific

  2. #2
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: Editing VBA Code - Not working

    hi all,

    Duplicate posting here: http://www.excelforum.com/excel-gene...t-working.html

    Rob
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

  3. #3
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: Modifying VBA to create new macro for recording data

    hi Bob,

    Thanks for modifying the thread title etc

    I'm not sure at a glance why your code wasn't working but it may be because you haven't explicitly defined all your range references (eg "columns.count" instead of "ws.columns.count") & probably because your Counta check needed to be changed (see file). I've optimised your code in the attached file & it seems to work for me now.

    hth
    Rob

+ 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