excel not responding - updating Historian Client Excel add-in, ends in Type Mismatch (error 13) error

andrewwhy

New Member
Joined
Jul 12, 2016
Messages
1
Hi,

I have a spreadsheet, which pulls data from Wonderware Historian into Excel, which I later graph. The spreadsheet has a few very small macros, but it now takes a very long time to open. Excel starts by (not responding) [not even calculating, pretty sure], and ends with the Type Mismatch (error 13) error, before it allows me to work with the spreadsheet.

The macros I have are:

Private Sub Workbook_Open()
Application.Calculation = xlManual
Application.CalculateBeforeSave = False
ActiveWorkbook.RefreshAll
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CalculateBeforeSave = True
Me.Save
End Sub


Function LastSaved() As Date
Application.Volatile
LastSaved = ThisWorkbook.BuiltinDocumentProperties(12)
End Function

These macros are used to choose when to calculate and pull data from the Historian client, otherwise it takes a long time to work with the spreadsheet (save all the changes till last), and also to output when the spreadsheet was last saved.

Why am I getting a type mismatch error, and perhaps more importantly, why is my spreadsheet "not responding" for such a long time before reaching the error?
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Am i right in thinking Your first macro is refreshing a dynamic table linked by some fashion to the Wonderware database?
In which case I'd point the finger at the SQL query/connection to that database, could be these wonderware folk have changed something on you without mentioning it?

Long periods of not responding aren't too much to worry about, it's the programs way of saying 'i need to think about this leave me alone' rather than call it 'crashing' altogether, happens often when dealing with large amounts of data.
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,479
Members
448,967
Latest member
visheshkotha

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
Back
Top