Forum Home
Press F1
 
Thread ID: 10803 2001-08-13 14:37:00 Help Please!!! Excell Macro Guest (0) Press F1
Post ID Timestamp Content User
16945 2001-08-13 14:37:00 Help!!!
Ok, i need to do a button with a macro, that when the user click in this button, it's write the document in a file called 001_1.xls, 001_2.xls...where only the number 1, 2 will change, but i will make this change, when prompts to me save file as...
Summarizing:
I want that the document, when i click in the button, prompt the pop save file as... but preserving the number 001_ before...Please, someone help me. Or mail me..
dcyrillo@ig.com.br
Thanks...
Guest (0)
16946 2001-08-14 05:20:00 The following macro will save the file with the next sequence of file names without any prompting, but there must be a worksheet called SAVE in the workbook, and with column A formatted as text. In cells A1 enter any text at all, in cell A2 enter 001_1 and in cell A3 enter 001_2.
Create the macro button and assign the following macro to it.

Sub file_save_as()

NEWFN = ActiveWorkbook.Sheets('SAVE').Range('A1').End(xlDo wn).Value & '.xls'
Range('SAVE!A1').End(xlDown).Select
Selection.AutoFill Destination:=ActiveCell.Offset(0, 0).Range('A1:A2'), Type:=xlFillDefault
ActiveWorkbook.SaveAs FileName:=NEWFN

End Sub

HTH
Guest (0)
1