Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Question

Post Timeline

added [excel] to 23464 questions - Shog9 (Id=811)
Link
added 114 characters in body
Source Link
mHelpMe
  • 6.7k
  • 28
  • 90
  • 179

I am using Excel 2013. I have added an activex control to my spreadsheet. The control is a checkbox which I have named chkAD1. My spreadsheet is called "timeseries_AD".

I am trying to reference the checkbox to check its value however without any joy. I have tried the lines below,

 worksheets("timeseries_AD").OleObjects("chkAD1").Value

This results in the error message "unable to get the OLEObjects property of the worksheet class".

I have read that an activex control has two names. One is the name of the shape that contains the control the other is the code name. I'm not sure which one I have changed. I clicked on my control and in the Name Box renamed it to "chkAD1". Is that the shape name or code name I have changed?

UPDATE - Apologies

Sorry the control I added is not an activex control it is actually a form control.

I am using Excel 2013. I have added an activex control to my spreadsheet. The control is a checkbox which I have named chkAD1. My spreadsheet is called "timeseries_AD".

I am trying to reference the checkbox to check its value however without any joy. I have tried the lines below,

 worksheets("timeseries_AD").OleObjects("chkAD1").Value

This results in the error message "unable to get the OLEObjects property of the worksheet class".

I have read that an activex control has two names. One is the name of the shape that contains the control the other is the code name. I'm not sure which one I have changed. I clicked on my control and in the Name Box renamed it to "chkAD1". Is that the shape name or code name I have changed?

I am using Excel 2013. I have added an activex control to my spreadsheet. The control is a checkbox which I have named chkAD1. My spreadsheet is called "timeseries_AD".

I am trying to reference the checkbox to check its value however without any joy. I have tried the lines below,

 worksheets("timeseries_AD").OleObjects("chkAD1").Value

This results in the error message "unable to get the OLEObjects property of the worksheet class".

I have read that an activex control has two names. One is the name of the shape that contains the control the other is the code name. I'm not sure which one I have changed. I clicked on my control and in the Name Box renamed it to "chkAD1". Is that the shape name or code name I have changed?

UPDATE - Apologies

Sorry the control I added is not an activex control it is actually a form control.

Source Link
mHelpMe
  • 6.7k
  • 28
  • 90
  • 179

excel spreadsheet referencing an activex control

I am using Excel 2013. I have added an activex control to my spreadsheet. The control is a checkbox which I have named chkAD1. My spreadsheet is called "timeseries_AD".

I am trying to reference the checkbox to check its value however without any joy. I have tried the lines below,

 worksheets("timeseries_AD").OleObjects("chkAD1").Value

This results in the error message "unable to get the OLEObjects property of the worksheet class".

I have read that an activex control has two names. One is the name of the shape that contains the control the other is the code name. I'm not sure which one I have changed. I clicked on my control and in the Name Box renamed it to "chkAD1". Is that the shape name or code name I have changed?

lang-vb

AltStyle によって変換されたページ (->オリジナル) /