ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Workbook_Open in ThisWorkbook.module (https://www.excelbanter.com/excel-discussion-misc-queries/176013-workbook_open-thisworkbook-module.html)

Bob Barnes

Workbook_Open in ThisWorkbook.module
 
Is running, but NOT working..Also, placing AUTO_OPEN there does NOT
run..tested both Workbook_Open and AUTO_OPEN using "Stop"..

Private Sub Workbook_Open()
Application.ScreenUpdating = False
Sheets("Details").Select
Columns("I:I").Select
Selection.NumberFormat = "m/d/yy;@"
Columns("L:L").Select
Selection.NumberFormat = "$#,##0.00_);[Red]($#,##0.00)"
Columns("M:M").Select
Selection.NumberFormat = "0"
Columns("N:N").Select
Selection.NumberFormat = "$#,##0.00_);[Red]($#,##0.00)"
Sheets("Monthly Reconcile Report").Select: Range("A1").Select
Application.ScreenUpdating = True
End Sub

Ideas? TIA - Bob

JLatham

Workbook_Open in ThisWorkbook.module
 
Bob,
Did you get an answer somewhere else? If not, actually I tried your code
and it worked on my system as is. But you could write it a little
differently:

Private Sub Workbook_Open()
Application.ScreenUpdating = False
Sheets("Details").Columns("I:I").NumberFormat = _
"m/d/yy;@"
Sheets("Details").Columns("L:L").NumberFormat = _
"$#,##0.00_);[Red]($#,##0.00)"
Sheets("Details").Columns("M:M").NumberFormat = _
"0"
Sheets("Details").Columns("N:N").NumberFormat = _
"$#,##0.00_);[Red]($#,##0.00)"
Sheets("Monthly Reconcile Report").Select
Range("A1").Select
Application.ScreenUpdating = True
End Sub

Does the same thing without jumping around on sheets so much.

"Bob Barnes" wrote:

Is running, but NOT working..Also, placing AUTO_OPEN there does NOT
run..tested both Workbook_Open and AUTO_OPEN using "Stop"..

Private Sub Workbook_Open()
Application.ScreenUpdating = False
Sheets("Details").Select
Columns("I:I").Select
Selection.NumberFormat = "m/d/yy;@"
Columns("L:L").Select
Selection.NumberFormat = "$#,##0.00_);[Red]($#,##0.00)"
Columns("M:M").Select
Selection.NumberFormat = "0"
Columns("N:N").Select
Selection.NumberFormat = "$#,##0.00_);[Red]($#,##0.00)"
Sheets("Monthly Reconcile Report").Select: Range("A1").Select
Application.ScreenUpdating = True
End Sub

Ideas? TIA - Bob



All times are GMT +1. The time now is 08:46 PM.

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