Excel spreadsheet control questino

shep

New Member
Joined
Feb 10, 2004
Messages
17
Hi there

I've just started using the Microsoft Web Components Spreadsheet Control. I've placed the control on a userform and I'm sure there is but can't work it out...is there a way of linking the spreadsheet control to a range of data contained on one of the underlying worksheets ?

thanks
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Not sure about linking, but this worked for me:

Code:
Private Sub UserForm_Initialize()
    Dim r As Integer, c As Integer
    With Spreadsheet1
        For r = 1 To 3
            For c = 1 To 3
                .Cells(r, c).Value = Worksheets("Sheet1").Cells(r, c).Value
            Next c
        Next r
    End With
End Sub

That puts the values in A1:C3 on Sheet1 into the same cells on the SpreadsheetControl.
 
Upvote 0

Forum statistics

Threads
1,216,225
Messages
6,129,601
Members
449,520
Latest member
TBFrieds

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