Posts by honoliipali

    [COLOR="Blue"]I am trying to pause a macro on a protected sheet, select 2 adjacent cells (initially protected), utilize an existing drop down box to select a name from the list, copy the name from the list into the range of cells, then re-start the macro.
    I had no problem when there was just one name (see John Smith below).
    I tried to use the InputBox command but needed to actually type in the name.
    Any ideas as to how to do what I need?


    Thank you all.[/COLOR]


    Code
    ActiveSheet.Unprotect
        Range("C27:D27").Select
        'ActiveCell.FormulaR1C1 = "John Smith"
       ' Application.CutCopyMode = False
       ' ActiveSheet.Paste
        'Range("c27:d27") = InputBox("Enter value")

    Re: Save As Error Handling Through Input Box


    Very simple solution Robert. It does what I need it to do.:)


    Is there a way that I can clear the default filename so they don't over write the original? The Excel workbook works by the user opening the file and filling in a bunch of unprotected cells. The problem I have is that some users don't take the time to enter a unique filename.


    Thank You - this forum is great and allows me to learn quickly.

    I need to:

    • Turn off "save" and "save as" command bars
    • Prompt user for a unique filename
    • Save file to a specific directory on the network common to all "p:\data\prc"
    • Requery user if filename exists and if they DON'T want to overwrite.
    • Return to worksheet (there is only one) if the user cancels from the message box.
    • Turn commandbars back on


    The macro runs from an on screen button
    I get bug errors on NO or CANCEL when clicked in the message box
    This is my current code:



    I am a very proficient user of Excel but just starting out with VBA. Thank You very much.