What is an automation bug in Excel

Automation error | Herber's Excel forum

The short way to the goal: job programming


Applies to: automation failure by: Blanco
Written on: 09/01/2012 16:26:03

Hello together.
Briefly about my situation. I am a diabetic and have written a few macros in Excel (where else ...) that show me my glucose curve and that is useful for my therapy. It actually works flawlessly. I don't want to duplicate the entries for one day (glucose value, food, insulin administration, etc.) (at home and in the office). So I set up an account with "Drop-Box". Actually a great thing. Synchronized with the office. It sounds great, but it doesn't work. The drop box does, I also have the Excel file (around 3.5MB) at home. I can open it, the macros work too.

But I cannot save it. An error message appears when you save it, and every time
following event (Worksheet.change) comes the error message "Automation error" ...

Does somebody has any idea? The macros weren't filtered out by a firewall, I can see them ..

Still the code, actually quite simple. (There are already a few 100 lines in other modules, but it hangs here in a moment).

Private Sub Worksheet_Change (ByVal Target As Range) If Copy Process Then Exit Sub If Change Process Then Exit Sub 'Basic Settings Sheet1 = ActiveSheet.Index Sheet2 = Sheet1 + 1 Row = Target.Row Column = Target.Column Version = Cells (1, 2). Value Select Case Version Case "4.1": Week start line = 30 daily increments = 20 Max columns = 217 Max lines = 170 IE decrease = Cells (9, 24). Value resolution = Cells (7, 24). Value hypo threshold = Cells (11, 24). Value For i = 1 To Worksheets.Count If Worksheets (i) .Name = "Template V4.1" Then Template number = i Next i Case "4.2": Week start line = 30 daily increments = 20 Max columns = 217 Max lines = 170 IE lowering = Cells ( 9, 24) .Value REMEDY = Cells (7, 24) .Value Hypo threshold = Cells (11, 24) .Value For i = 1 To Worksheets.Count If Worksheets (i) .Name = "Template V4.2" Then Template number = i Next i Case Else: Exit Sub End Select 'additional termination conditions If ( row < wochenstartzeile)="" or="" (zeile=""> MaxRows) Then Exit Sub If (Column < 4)="" or="" (spalte=""> MaxSpalten) Then Exit Sub 'Current position of the input Akttag = Int ((Line - Week start line) / Day increment) + 1 Day start line = Week start line + (Akttag - 1) * Day increment Relative line = Line - Day start line' Determine the input and branch Select Case Relative line Case 4 To 9: Select Case Column Case 4 To 99: Diary Entry V41 (Akttag) Case 125 To 217: Basic Change V41 Case Else: Exit Sub End Select Case 16: Profile = Cells (Line - 15, Column). Value Target Line = Day Start Line + 23 + Profile target column = column + 121 Cells (target row, target column) .Value = Cells (row - 14, column) .Value + Cells (_ row, column) .Value Case Else: Exit Sub End Select End Sub ------ ---------

I admit that there may also be a problem with this "drop box", but: The file is there, the code is there and the error message too ..?

Maybe someone has an idea and can tell me what I'm doing wrong ...

Blanco

Applies to: AW: Automation error by: Rolf
Written on: 09/01/2012 17:06:04

Hello Blanco,

with such an error message, my toenails curl up. I once had a similar problem; was able to solve it through try-and-error. Try the following:
Open your file> Developer> Visual Basic> Tools> References
If there an error message - "NOT AVAILABLE ..." appears, remove the checkmark.

Greetings, Rolf


Contributions from the Excel examples on the subject of "Compare checkboxes"