SOLVED!PRINT & SAVE FILE AS CELL VALUE

ROBINSYN

Board Regular
Joined
Aug 19, 2002
Messages
188
Is there a way I can assign a macro to a button to print, print area set in sheet1.
Can I also do the same thing but assign the save file as feature using the values in two cells? IE: 3-60-001 is in cell a and vendor name in a2.

Really confused when it come to macros.
Appreciate all help.
This message was edited by ROBINSYN on 2002-09-07 07:08
This message was edited by ROBINSYN on 2002-10-27 18:16
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
ROBINSYN,

Q1: Do You really need a macro for this?
- Select the area (cellrange) You want to print.
- Choose the command File | Print Area | Set Print Area.
- Print it out.

Q2: Save As
Following macro will save active workbook with the name from cell A1 and B1.<pre>
Sub SaveBook()
Dim rnCell1 As Range, rnCell2 As Range

'Your can replace the reference A1 with Your own.
Set rnCell1 = ThisWorkbook.Worksheets("Blad1").Range("A1")

'Your can replace the reference A1 with Your own.
Set rnCell2 = ThisWorkbook.Worksheets("Blad1").Range("B1")

ThisWorkbook.SaveAs Filename:=CStr(rnCell1.Value) & _ CStr(rnCell2.Value</pre>


Kind regards,
Dennis

Ps Hm, 400 replies....already???
This message was edited by XL-Dennis on 2002-09-07 08:52
 
Upvote 0
No, I do not need a print macro. The people who will bw using this do. They are extremely new to computers and have a hard time with any icons or how to find the file menu. I just want to make this spreadsheet as friendly as possible.

Thanks for the macro to save the file. Works like a dream. Solves so many problems for me.
 
Upvote 0
Create a button using the drawing tool

Then, open the macro recorder and then go thru the steps of printing what you want to print, this will make the macro. Then right click on the button you made and select assign macro.
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,192
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top