+ Reply to Thread
Results 1 to 2 of 2

Saving code as a macro and run from desktop

  1. #1
    Registered User
    Join Date
    01-22-2009
    Location
    Virginia
    MS-Off Ver
    Excel 2003
    Posts
    1

    Saving code as a macro and run from desktop

    Thank you in advance for looking at this problem. I have patched together some VBA code to run a simple counter used to tally the number of patients seen in a day. The intention of this counter is to provide and accurate count as well as storing the data for historically purposes. In the edit mode everything runs great, even the data save function which also zero’s the cells. I have tried many different ways to get it to autorun or even save it as a macro. My problem is that I do not have a good understanding of this, or even how to make this program work from a desktop shortcut. Ideally, I would like to click a desktop shortcut and only have the userform pop up so data can be updated/entered. When the user closes the userform, the form closes and stores the data. The method that I have chosen to save the data is not very efficient, but functional. I am also interested having the data store on a single worksheet whereas; the data is simply stored in each column by date. This would definite facilitate graphing data and comparing our historical encounters. This part of the project may have to be done later. I am using Excel2003. . I am active duty navy and have limited resources here at sea. Any help you can provide is greatly appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Here's an alternate approach; see the attachment.

    The start date is entered in A1. Don't change it once you start recording data.

    Open the workbook, and click one of the column headers. It will scroll to the row containing the current date, bump the value in the column by 1, add a total formula, and close the workbook.

    You can add another worksheet to do analysis by week, month, etc.

    Beat Army!
    Attached Files Attached Files
    Last edited by shg; 01-22-2009 at 02:40 PM.
    Entia non sunt multiplicanda sine necessitate

+ 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