Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Well, I'm just plain stumped. I get type mismatch errors early on trying to
save the calculation mode of excel object and a different error when trying to set it to manual: Dim CalculationMode As Variant Private StatusBarSetting As Boolean Dim xl As Excel.Application Dim Argv As Variant Sub Main() Dim n As Integer Dim sArgv As String Argv = Parse_Args(5) sArgv = "" For n = 1 To UBound(Argv) sArgv = sArgv & Argv(n) & vbCrLf Next n MsgBox "Arguments found: " & vbCrLf & sArgv Start_Excel Quit_Excel End Sub Private Sub Start_Excel() Set xl = CreateObject("Excel.Application") If Err.Number < 0 Then End Call SaveSettings End Sub Private Sub Quit_Excel() RestoreSettings xl.Quit Set xl = Nothing End Sub Private Sub SaveSettings() 'On Error Resume Next If xl Is Nothing Then MsgBox "Internal error!!! xl is Nothing!" End End If xl.Interactive = False xl.AskToUpdateLinks = False CalculationMode = xl.Calculation <<-- type mismatch error on this statement but don't know why. xl.Calculation = xlCalculationManual <<- error 1004 on this statement, "Method 'Calculation' of object '_Application' failed and don't know why StatusBarSetting = xl.DisplayStatusBar xl.DisplayAlerts = False xl.Cursor = xlWait xl.ScreenUpdating = False xl.DisplayStatusBar = True End Sub Ken Shaffer |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculation Setting in Excel | Excel Discussion (Misc queries) | |||
Font and size are in Excel has gone shaded. Will not let me type. | Excel Worksheet Functions | |||
Provide a way to turn off auto-checking excel formulas as I type t | Excel Discussion (Misc queries) | |||
Saving a Excel 97 file into Excel 2003 file | Excel Discussion (Misc queries) | |||
Opening and saving Excel 2003 file from Excel 97. | Excel Discussion (Misc queries) |