ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   before print (https://www.excelbanter.com/excel-programming/315578-before-print.html)

Bill Kuunders

before print
 
I've had a macro "fixdates" to fix up a column on a "schedule" sheet for
some time now.
The macro is in a general module as I need to use it after edits.
The macro also gets called in the this workbook --before print.--

Last night I created a new sheet and a macro to print it.

The before print "fixdates" is again called but it does not select the
"schedule" sheet it does the edit part of the macro on the new "label "
sheet in stead.

Using F8 shows me that the "fixdates" macro just does not select the
schedule sheet.

Got me stumped!

Regards

Bill K



Jim Thomlinson[_3_]

before print
 
Add this line

sheets("Schedule").select

"Bill Kuunders" wrote:

I've had a macro "fixdates" to fix up a column on a "schedule" sheet for
some time now.
The macro is in a general module as I need to use it after edits.
The macro also gets called in the this workbook --before print.--

Last night I created a new sheet and a macro to print it.

The before print "fixdates" is again called but it does not select the
"schedule" sheet it does the edit part of the macro on the new "label "
sheet in stead.

Using F8 shows me that the "fixdates" macro just does not select the
schedule sheet.

Got me stumped!

Regards

Bill K




Bill Kuunders

before print
 
Thanks Jim,

That line is already there and is the stumbling block.
The system just doesn't want to select that sheet
when I call the sub via a macro with a print instruction which should call
the "before print" routine from the "this workbook" .
The sheet does get selected if I use the normal file/print/ of the excel
tool bar.

Regards
Bill K


"Jim Thomlinson" wrote in message
...
Add this line

sheets("Schedule").select

"Bill Kuunders" wrote:

I've had a macro "fixdates" to fix up a column on a "schedule" sheet for
some time now.
The macro is in a general module as I need to use it after edits.
The macro also gets called in the this workbook --before print.--

Last night I created a new sheet and a macro to print it.

The before print "fixdates" is again called but it does not select the
"schedule" sheet it does the edit part of the macro on the new "label "
sheet in stead.

Using F8 shows me that the "fixdates" macro just does not select the
schedule sheet.

Got me stumped!

Regards

Bill K







All times are GMT +1. The time now is 03:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com