Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Phil
Never try to change this setting on a users machine. Read this thread http://tinyurl.com/yvpag -- Regards Ron de Bruin http://www.rondebruin.nl "Phil Hageman" wrote in message ... What would the code be to reset user Display Settings to "800 by 600 pixels" in my Auto Open Sub? Tried creating a macro but VBA does not register the commands. Thanks, Phil |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ron,
Youre right €“ users would get down right hostile if I changed their setting. Read your thread but am lost as to how to fit it into my Auto_Open sub. Could you show me how to fit it in. This is a big issue for me all of a sudden because of a network change that defaulted users (200+) to different settings. This zoom idea seems like the answer I desperately need. My application is desinged with 800x600, but a lot of users have been changed to 1024x768 - a real problem since I have hidden some things off-screen.. Thanks Phi PS. Im not a programmer, so if you see something below that could be cleaned up, please suggest Option Explici Sub Auto_Open( 'This code establishes the screen protocol for on-screen presentations Dim WS As Workshee Application.ScreenUpdating = False 'Turns off updating so code runs faste Application.Calculation = xlAutomatic 'Executes calculations as data is entered Application.DisplayFullScreen = True 'Sizes to full screen, no toolbar For Each WS In Worksheet If WS.Visible = xlSheetVisible The WS.Selec Application.Goto WS.Range("A1"), True 'Active cell is A ActiveWindow.DisplayGridlines = False 'Turns off gridline ActiveWindow.DisplayWorkbookTabs = False 'Turns off workbook tab ActiveWindow.DisplayHeadings = False 'Turns off column & row heading ActiveWindow.DisplayHorizontalScrollBar = False 'Turns off horizontal scroll ba ActiveWindow.WindowState = xlMaximized 'Maximizes selected worksheet ActiveWindow.View = xlNormalVie End I Nex Worksheets("Customer").Select 'Selects the Customer workshee ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column heading ActiveSheet.PageSetup.Zoom = 91 'Sets print scalin ActiveSheet.PageSetup.TopMargin = Application.InchesToPoints(0.5) 'Sets top header at .5" for proper print fit Worksheets("Rationale11").Select 'Selects the Customer workshee ActiveWindow.Zoom = 67 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column heading ActiveSheet.PageSetup.Zoom = 100 'Sets print scalin Worksheets("Rationale12").Select 'Selects the Customer workshee ActiveWindow.Zoom = 67 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column heading ActiveSheet.PageSetup.Zoom = 100 'Sets print scalin Worksheets("Rationale13").Select 'Selects the Customer workshee ActiveWindow.Zoom = 67 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column heading ActiveSheet.PageSetup.Zoom = 100 'Sets print scalin Worksheets("Financial").Select 'Selects the Financial workshee ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column heading ActiveWindow.DisplayHeadings = False 'Turns off row and column heading ActiveSheet.PageSetup.Zoom = 91 'Sets print scalin ActiveSheet.PageSetup.TopMargin = Application.InchesToPoints(0.5) 'Sets top header at .5" for proper print fit Worksheets("Rationale21").Select 'Selects the Customer workshee ActiveWindow.Zoom = 67 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column heading ActiveSheet.PageSetup.Zoom = 100 'Sets print scalin Worksheets("Rationale22").Select 'Selects the Customer workshee ActiveWindow.Zoom = 67 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column heading ActiveSheet.PageSetup.Zoom = 100 'Sets print scalin Worksheets("Rationale23").Select 'Selects the Customer workshee ActiveWindow.Zoom = 67 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Learning and Growth").Select 'Selects the L&G worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 91 'Sets print scaling ActiveSheet.PageSetup.TopMargin = Application.InchesToPoints(0.5) 'Sets top header at .5" for proper print fit. Worksheets("Rationale31").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Rationale32").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Rationale33").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Internal Business Process").Select 'Selects the IBP worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 91 'Sets print scaling ActiveSheet.PageSetup.TopMargin = Application.InchesToPoints(0.5) 'Sets top header at .5" for proper print fit. Worksheets("Rationale41").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Rationale42").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Rationale43").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Scorecard").Select 'To open the workbook on the Scorecard worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 95 'Sets print scaling ActiveSheet.PageSetup.TopMargin = Application.InchesToPoints(0#) 'Sets top header at 0.0" for proper print fit. ThisWorkbook.Colors(7) = RGB(255, 124, 128) 'To change default color pink (index number 7) to light red (for charts) Application.AutoPercentEntry = True 'In percent formatted cells, returns %, if decimal or whole number entered. Application.ScreenUpdating = True 'Restore screen updating capabilities End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi phil
How many sheet do you have in this workbook?. -- Regards Ron de Bruin http://www.rondebruin.nl "Phil Hageman" wrote in message ... Ron, You're right - users would get down right hostile if I changed their setting. Read your thread but am lost as to how to fit it into my Auto_Open sub. Could you show me how to fit it in. This is a big issue for me all of a sudden because of a network change that defaulted users (200+) to different settings. This zoom idea seems like the answer I desperately need. My application is desinged with 800x600, but a lot of users have been changed to 1024x768 - a real problem since I have hidden some things off-screen... Thanks, Phil PS. I'm not a programmer, so if you see something below that could be cleaned up, please suggest. P Option Explicit Sub Auto_Open() 'This code establishes the screen protocol for on-screen presentations. Dim WS As Worksheet Application.ScreenUpdating = False 'Turns off updating so code runs faster Application.Calculation = xlAutomatic 'Executes calculations as data is entered. Application.DisplayFullScreen = True 'Sizes to full screen, no toolbars For Each WS In Worksheets If WS.Visible = xlSheetVisible Then WS.Select Application.Goto WS.Range("A1"), True 'Active cell is A1 ActiveWindow.DisplayGridlines = False 'Turns off gridlines ActiveWindow.DisplayWorkbookTabs = False 'Turns off workbook tabs ActiveWindow.DisplayHeadings = False 'Turns off column & row headings ActiveWindow.DisplayHorizontalScrollBar = False 'Turns off horizontal scroll bar ActiveWindow.WindowState = xlMaximized 'Maximizes selected worksheets ActiveWindow.View = xlNormalView End If Next Worksheets("Customer").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 91 'Sets print scaling ActiveSheet.PageSetup.TopMargin = Application.InchesToPoints(0.5) 'Sets top header at .5" for proper print fit. Worksheets("Rationale11").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 67 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Rationale12").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 67 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Rationale13").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 67 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Financial").Select 'Selects the Financial worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 91 'Sets print scaling ActiveSheet.PageSetup.TopMargin = Application.InchesToPoints(0.5) 'Sets top header at .5" for proper print fit. Worksheets("Rationale21").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 67 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Rationale22").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 67 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Rationale23").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 67 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Learning and Growth").Select 'Selects the L&G worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 91 'Sets print scaling ActiveSheet.PageSetup.TopMargin = Application.InchesToPoints(0.5) 'Sets top header at .5" for proper print fit. Worksheets("Rationale31").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Rationale32").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Rationale33").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Internal Business Process").Select 'Selects the IBP worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 91 'Sets print scaling ActiveSheet.PageSetup.TopMargin = Application.InchesToPoints(0.5) 'Sets top header at .5" for proper print fit. Worksheets("Rationale41").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Rationale42").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Rationale43").Select 'Selects the Customer worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 100 'Sets print scaling Worksheets("Scorecard").Select 'To open the workbook on the Scorecard worksheet ActiveWindow.Zoom = 62 'Sizes the window to 62% ActiveWindow.DisplayHeadings = False 'Turns off row and column headings ActiveSheet.PageSetup.Zoom = 95 'Sets print scaling ActiveSheet.PageSetup.TopMargin = Application.InchesToPoints(0#) 'Sets top header at 0.0" for proper print fit. ThisWorkbook.Colors(7) = RGB(255, 124, 128) 'To change default color pink (index number 7) to light red (for charts) Application.AutoPercentEntry = True 'In percent formatted cells, returns %, if decimal or whole number entered. Application.ScreenUpdating = True 'Restore screen updating capabilities End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nineteen
|
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Then Tom's idea is not a option(create different sheets)
Try this Copy this in a normal module Declare Function GetSystemMetrics32 Lib "user32" Alias "GetSystemMetrics" _ (ByVal nIndex As Long) As Long Function DisplayVideoResolution() As String DisplayVideoResolution = GetSystemMetrics32(0) & " x " & _ GetSystemMetrics32(1) End Function Sub Auto_Open() Dim strResolution As String Dim zoomnumber As Integer Dim sh As Worksheet strResolution = DisplayVideoResolution If strResolution = "1024 x 768" Then zoomnumber = 100 ElseIf strResolution = "800 x 600" Then zoomnumber = 75 ElseIf strResolution = "640 x 480" Then zoomnumber = 50 End If Application.ScreenUpdating = False For Each sh In ThisWorkbook.Worksheets sh.Select ActiveWindow.zoom = zoomnumber Next ThisWorkbook.Worksheets(1).Select Application.ScreenUpdating = True End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Phil Hageman" wrote in message ... Nineteen |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ron, Copied the code into a separate module, saved and closed. Changed my resolution from 800 x 600 to 1024 x 768, opened the workbook and received the following VB warning: Ambiguous name detected: Auto_Open
Phil |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to open worksheet with preset columns displayed? | New Users to Excel | |||
Setting Y axis display labels | Charts and Charting in Excel | |||
How do I preset data to auto copy to a certain page | Excel Discussion (Misc queries) | |||
How can I set up the default setting of a chart display? | Setting up and Configuration of Excel | |||
setting the auto row height using vba | Excel Programming |