Posts by bozo

    :thumbcoo:Thanks so much WillR & the others that have beared with me through this odeal. I finally got it! And along the way I learned a whole new world about VBE code...what a bonus! It seems that the error I was making was I was pasteing the entire like below

    Quote

    Private Sub Workbook_Open()


    Worksheets("Sheet1").Range("A2").Value = Date


    End Sub

    instead of

    Quote

    Worksheets("Sheet1").Range("A2").Value = Date

    thus giving me the Compile error. I even took it one step further to have the date inserted on all four sheets of the workbook by using the "=sheet1 cell location" to place the print date across all four sheets....very kool:thumbcoo:
    Acomplishing this is better than sex.....well close anyway! Thanks again for putting up with this dummy...and I hope to return to this forum again to gain some more knowledge.
    Larry

    Still no-go...here's what is happening starting with a new workbook
    1. Open excel with new workbook
    2. Alt+F11 to open VBE
    3. Double click "ThisWorkbook" in the VBAProject
    4. Under "general" I select "Workbook"
    5. Under "Open" (right payne) I select "Before Print"
    6. Paste this code

    Quote

    Private Sub Workbook_Open()


    Worksheets("Sheet1").Range("A2").Value = Date


    End Sub


    7. Return to workbook, & select "print"
    8. I get returned to the VBE window with an error (below)

    Quote

    Compile error:
    Ambiguous name detected:Workbook_Open
    [OK] [Help]


    9. In the VBE screen "Private Sub Workbook Open" is highlighted.
    10. I can select OK, & it will send the Doc to print, but the "date result" I am seeking is still not present (even after closing, saving, & reopening)


    When I re-open the Book1, I am first taked to the VBE screen, showing the same Compile error. This is driving me crazy...I know I can manually insert (as 2rrs has sugested) the date on a thousand PO's faster than it's taking me to achieve this result...but it's my quest for knowledge now...Please don't give up on me & save my sanity!
    Thanks-Larry

    Now I found it...when I opened the Microsoft Visual Basic previously, the "Project-VBAProject" payne was closed...so I never saw the "This Workbook" that you were reffering to. By going to "View" at the top I saw the "Project Explorer" and it opened up the Project-VBAProject payne. I don't have time now to try to place the code in the right place (hopefully), but I will tonight. I appreciate you indulgence very much. I also DL Word Doc that was posted. Thanks & I will post back results latter
    Larry

    Quote

    Select general & "This WOrkbook"


    Select Declarations and say "Before Print"

    Ater opening my worksheet I hit Alt+F11, which opens up Microsoft Visual Basic screen. In the payne, there is General on the left. I hit the drop down box..and there is NO option for "This WOrkbook". The only option is "general"...no other options available (I previously though that was because I only have one workbook open). So I then go to the right, and select (Declarations)...paste the code into the payne. Go back to the workbook, & print.
    Still no results in the target cell.
    ________________________________
    FWind, when I do your sugestion, I first copy the code from your post, then open the workbook, Alt+F11 to bring up the editor, then select "insert" from the top top, select "module" paste the code. I return to the workbook, but do not see any "datecreate" or any date. I do not see a refference to a cell location for the results in your code, should there be?
    Thanks-Larry

    I have tried the three different methods suggested, and here are my results:
    I copy the code on post, and paste the code into Microsoft Visual Basic (Alt+F11) selecting (declarations). It creates a category “Before_Print”. Here is a cut & paste of the code pasted:

    Then I return to workbook, and print it.
    Results: does not return result in “F2”
    ………………………………………………………………………………………………
    Then I tried the next formula suggested, cut & paste the same way.


    Still no result in F2
    ……………………………………………………………………………………………
    Then I tried the formula that bnix suggested. I pasted this formula exactly like this =IF(ISBLANK(F2),NOW(),"") into cell I2
    I still do not get any result in F2
    ………………………………………………………………………………………
    I have no idea why one of these procedures won’t return a result. Perhaps another approach such as a “date created” or “date last saved”. This shouldn’t be that hard to achieve. Is it possibe that there is an add-on that I do not have installed, that is causing the "no result". I am running Excel 2002.
    Thanx-Larry

    Here's what I have done with this formula:
    I place the formula in cell i2
    this exact formula:
    =IF(ISBLANK(F2),NOW(),"")
    cell F2 being where I want my result...I get no results in F2. I must be missing a step.________________________________



    Using the VBE, I get to the window with "General" on upper left & select "Declarations" on the upper right ( I only have this one workbook open...so I do not see a selection for "Open this Workbook), then pasted the code you posted, return to worksheet, & print the worksheet. Still do not have the print date in cell F2. Below is a cut & paste of VBE

    Either way I try I do not get the results in cell F2...what next...I like the formula route best, but would settle for anything that gets the result.
    thanx so much for your input-Larry


    edit BTW: I have renamed the "Sheet 1" to "Sagebrush White" which is the name of that sheet, and then replaced "Sheet 1" with "Sagebrush White" in the VBE code. but still no results.

    I am not using a macro. OK I got the drift of the code you posted, but don't have a clue as to where to put that code to gain the result I am seeking. I did get the

    Quote

    (just change Cell "A3" for whatever you need

    but thats all I got. Sorry for being such a dummie
    thanks-Larry

    As an example of what I am trying to do...in an older MS Works spreadsheet program, there was a function "=printdate", which would do the trick for me, since these PO's are always printed via fax, therefore the date I created the PO was recorded.
    Thanks-Larry

    I have a worksheet used as a purchase order. I would like to have a cell display the date that the purchase order was created. I know about the =now() formula, but that date then changes the next day to the current date. I want to have the date that I actually created the PO. I know this must be a simple formula, but I just can't find it in the "help" of excel. Any help is greatly appreciated in advance.
    Thanks-Larry