The insert>Name>Define is on the spreadsheet itself. That is where you name a range. The Alt+Fll brings you to the visiual basic editor screen where you can write a macro. I hope that helps clarify. If you need anymore info just post a response.
Wow, it is almost working! I went to view>name>define before I pushed Alt+F11, and I think it worked.
But, when I clicked the button, I got up a preview. Is it difficult to make a formula which drop the preview, and print right away, or maybe it is smart to have a preview, just in case? Do you have any thoughts about it?
Hey, this is starting to be fun.
Espen
There should be a line in the line of code that calls the print commmand. In that line there there should be "Preview: True" ,if you change that to false it will not do the preview. I am assuming you did a macro. As for the preview option, it depends on what you are doing. It is usually never a bad thing to see what you are printing.
Thank you Greg
One last question on this subject
Can I copy the text, paste it, and change the areas? Or do I have to write it everytime because of the recording?
espen
Hi espen
The answer is yes but you will need to change the name after each "Sub" as well as the range.
I think it may have been me that gave you the code, I'm sorry about the typos. Here is the corrected version.
1. Push Alt+F11 and go to Insert>Module and paste in this code as many times as you have ranges to print: e.g if you have 10 ranges then paste it in 10 times, one below the other.
Sub PrintRange()
With ActiveSheet
.PageSetup.PrintArea = ""
.PageSetup.PrintArea = "$A$1:$D$9"
'Replace the line below with .PrintOut to just print
Application.Dialogs(xlDialogPrintPreview).Show
.PageSetup.PrintArea = ""
.DisplayPageBreaks = False
End With
End Sub
2. Change all PrintArea ranges to suit. But leave the [.PageSetup.PrintArea = ""] as is.
3. Give the Procedures DIFFERENT one word names. E.g change "MyPrintRange" to MyPrintRange1 etc.
4. Push Alt+Q and then go to View>Toolbars>Forms. Double Click the "Button" and paste in the cell you want it. Click the Macro name to assign to this button and then OK.
5. Click the next cell where you want a Button and again assign the macro. When you have finished push Esc to remove the button from your cipboard.
6.Right click on each button and select "Format Control". and make any changes.
7. Save.
If anything is still not clear, just yell!!
Dave
OzGrid Business Applications
If anything is still not clear, just yell!! Dave
For this kind of stuff: did you look at custom views? You set up a view, including a certain (set of) print area's and add the view. Later you can use the views to print the different print area's. Maintenance is also easy: just change a certain view... just my two cents...