+ Reply to Thread
Results 1 to 2 of 2

Object required?

  1. #1
    Jeff Wright
    Guest

    Object required?

    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").OLEObjects("Optionbutton" &
    i) _
    .Object.Value.Copy Workbooks("Jeff2.xls").Worksheets("Sheet1").Cells(i,
    1)
    Next i
    End Sub






  2. #2
    Vasant Nanavati
    Guest

    Re: Object required?

    I thought I just answered this .

    --

    Vasant

    "Jeff Wright" <[email protected]> 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").OLEObjects("Optionbutton"

    &
    > i) _
    > .Object.Value.Copy

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




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1