View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default difficult but supposing not imposible

wouldn't common sense tell you to store the current values and restore them
when you exit. If you can't think of how to store them, how about on a
hidden sheet. Also, it is unlikely that you would need to touch most of
those settings at all. The best guidance is to leave things alone unless
you absolutely must alter them. Just because you recorded this code,
doesn't mean you need to keep all the settings. If you only need to alter
one setting, then remove everything but that one setting.

Hopefully your users won't approach management to have you fired. Good
luck.

--
Regards,
Tom Ogilvy


"filo666" wrote in message
...
Hi, I'm tryng to accomplish something:
there is somehow save the excells aplication options before start to run a
program, disable them and when your programs ends enable them again.

For example:
I don't want in my program that the automatic calculation is disabled, so

in
a auto_open() sub I wrote application.Calculation = xlAutomatic, then ina

a
auto_close() sub I put manual calculation.
The problem is that I have 30 users, and they are very angry with me

because
each time they use my program in his computer all excells is badly
configurated.
there is some way to save the actual excells state.
look the code attached so you cand understand the problemtatic
my program works just if in the auto_open() sub appears the following

code:

Sub customized()
With Application
.CellDragAndDrop = False
.FixedDecimal = False
.FixedDecimalPlaces = 2
.AskToUpdateLinks = False
.MoveAfterReturnDirection = xlToRight
.EnableAutoComplete = False
.EnableAnimations = False
.DisplayPasteOptions = False
.DisplayInsertOptions = False
.ReferenceStyle = xlA1
.IgnoreRemoteRequests = False
.PromptForSummaryInfo = False
.DisplayRecentFiles = False
.StandardFont = "Arial"
.StandardFontSize = "10"
.RecentFiles.Maximum = 0
.EnableSound = False
.RollZoom = False
.DisplayFunctionToolTips = False
.MapPaperSize = True
.DecimalSeparator = "."
.ThousandsSeparator = ","
.UseSystemSeparators = False
.AutoRecover.Enabled = False
.ShowStartupDialog = False
.DisplayFormulaBar = False
.DisplayStatusBar = False
.DisplayCommentIndicator = 0
.ShowWindowsInTaskbar = False
.Calculation = xlAutomatic
With ActiveWindow
.DisplayFormulas = False
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayOutline = False
.DisplayZeros = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
ActiveSheet.DisplayAutomaticPageBreaks = False
ActiveWorkbook.DisplayDrawingObjects = xlAll

End Sub

TIA