Excel VBA UserForm element not found error
Posted: Tue May 18, 2021 1:24 am
I cannot add a Teechart control to an Excel UserForm. Get error "Element not found".
Using 64 bit Excel Microsoft 365 MSO (16.0.13929.20360) 64-bit
Using TeeChart202164.ocx 2021.0.2.10
I can insert a teechart control on to a spreadsheet (see attached) but cannot add one to a VBA Userform. it works to add a teechart control to a Userform with code on form initialize:
Dim cnTCht As TeeChart.TChart
Set cnTCht = Me.Controls.Add("TeeChart.TChart", "TChart1", True)
But cannot add with toolbox. Can add custom teechart control to toolbox but gets error when control is dragged to form. I have also deleted the C:\Users\user\AppData\Local\Temp\Excel8.0\TeeChart.exd file but does not help.
Example workbook attached.
Using 64 bit Excel Microsoft 365 MSO (16.0.13929.20360) 64-bit
Using TeeChart202164.ocx 2021.0.2.10
I can insert a teechart control on to a spreadsheet (see attached) but cannot add one to a VBA Userform. it works to add a teechart control to a Userform with code on form initialize:
Dim cnTCht As TeeChart.TChart
Set cnTCht = Me.Controls.Add("TeeChart.TChart", "TChart1", True)
But cannot add with toolbox. Can add custom teechart control to toolbox but gets error when control is dragged to form. I have also deleted the C:\Users\user\AppData\Local\Temp\Excel8.0\TeeChart.exd file but does not help.
Example workbook attached.