BINGO!!! Thanks!
It gave me some kind of error about not having Button1_Click, but I just ranamed the Print code and it worked.
Is Button1_Click a specific method I need to assign code, or were you just using that as an example of what my code could be named?
I've tried breaking it up into a couple of statements
newWbk.VBProject.VBComponents.Import("W:\XXXX\Module1.bas")
newWbk.Sheets(outShtName).Shapes("Button 1").Select
Selection.OnAction = "PrintFormatted"
When I single step through it, the Import of the module works fine, and selecting Button 1...
Hey everyone, I resolved my printing problem. Turns out I don't have to make it my fulltime job to print this because there's a great function in VBA called HPagebreaks.
Since I know my spreadsheet will always be 4 Pages accross and ?? pages down, I can use a function like this to determine...
I'm not sure what you mean by something in the code.
I know that when I do get the new spreadsheet, and send it to another machine that button still referances the template code. When you right click and reassign the Printing Macro to the button, it works fine.
So the macro is being imported...
I posted a few days ago about an Excel template I've created. The template creates several new excel spreadsheets with data for different users, and I wish to transfer a button and a print formatting macro to these sheets.
In my code I have the following two statements to import the Module...
It does matter if I print them in order. If a user has a 30 page spreadsheet to print out, they need those pages appear in the correct order. I believe I've solved the problem of getting everything to print properly, I just can't get it to stop in any nice way.
I have an if statement within a...
Not exactly. These spreadsheets are about 4 pages accross, and an undetermined number of rows. So page 5, page 9 and page 13, etc, need to behave like Page 1. (I am printing ACCROSS and DOWN.)
Every time the leftmost page is printed those columns need to be exposed. For the other 3 pages...
Wow. Can't tell you how helpful these various suggestions have been. What I'm down to now, is a separate PrintFormatting macro that is transfered to each of the Workbooks I'm generating.
This macro Prints the spreadsheet accross and down as follows:
-Prints page 1
-Hides columns
-Prints...
I'm not sure I understand this solution.
My template Excel file will generate 20 or 30 spreadsheets (all separate Excel files), which will then be distributed to people. These newly generated files do not contain any of the macros the original Template file.
How can I ensure that in my...
Related question: I have this macro below that prints the first few pages. How do I automate the transfer of this macro (and an associated button) into the new spreadsheets I'm generating and sending out to people?
Sub RecordingPrintingAgain()
ActiveWindow.SelectedSheets.PrintOut From:=1...
Agreed. A ridiculous requirement even.
The users need this to be in Excel, as a regular spreadsheet they can edit. There are a larege number of columns so there are several pages across, and many more down. The first page needs to display all of the information, but the remaining pages only...
Hello
I'm generating some excel spreadsheets using VBA to specify page setup. Is there a way that I can include columns A, B, H and I on every page.
Example:
Page 1 [Columns A-N]
Page 2 [A,B,H,I,O-X]
Page 3 [A,B,H,I,Y-AI]
Page 4 [A,B,H,I, etc]
I'm really hoping someone can point me in the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.