ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Object required? (https://www.excelbanter.com/excel-programming/329393-re-object-required.html)

Vasant Nanavati

Object required?
 
I thought I just answered this :).

--

Vasant

"Jeff Wright" wrote in message
news:ghthe.40989$_K.31073@fed1read03...
Hi, folks

What I'm trying to do in the routine below is to copy the boolean values

of
OptionButtons 1 through 50 to column A in another workbook. However, I'm
getting an error 424, "Object required". Any ideas on what's wrong with

this
code? Also, do I need to dim i? If so, would the correct syntax be "Dim
i(50)" or "Dim i(50) as Integer"? I tried those statements, but then I get

a
"Type Mismatch" error.

Thanks (again!!)

Slightly confused in Arizona,

Jeff

Sub test()
For i = 1 To 50
Workbooks("Jeff1.xls").Worksheets("Sheet1").OLEObj ects("Optionbutton"

&
i) _
.Object.Value.Copy

Workbooks("Jeff2.xls").Worksheets("Sheet1").Cells( i,
1)
Next i
End Sub









All times are GMT +1. The time now is 07:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com