Setting Up Project To Open A Certain Way

Amnesia_180

New Member
Joined
Jan 25, 2005
Messages
14
Hey again.
I have another question.
I am looking for a way to setup the sheets so that when the project is opened, certain boxes are already selected and certain things (such as no gridlines etc, colours etc) are setup ready to go. That way the macros will run first time.

Thanks again
Amnesia
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

~Zodiac~

Board Regular
Joined
Jan 10, 2005
Messages
70
'Place the following code in "ThisWorkbook" (go to the vb editor and look below the sheets, there is a white square with the excel symbol in it, thats ThisWorkbook)
' whenever you open the workbook, this macro will be run and will change every worksheet into a borderless, black on white sheet


Private Sub Workbook_Open()

'
' Workbook_Open Macro
'
Dim ws As WorkSheet
Application.DisplayAlerts = False
For Each ws In ActiveWorkbook.Charts
Cells.Select
Range("E20").Activate
Selection.Font.ColorIndex = 0
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Selection.Interior.ColorIndex = xlNone
Next



End Sub


HTH

edit: Welcome to the Board
 

Forum statistics

Threads
1,148,224
Messages
5,745,472
Members
423,953
Latest member
MrC54

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top