Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does the Datagrid control work when used on Excel
UserForm? When I run my UserForm, the control is displayed but I am unable to enter any data. All of the microsoft docs I see only refer to VB use of the control, not VBA. Same question about the MOWC spreadsheet control. Thanks for your help, Mike |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a flexgrid which I populate from a range thus:
Private Sub LoadFlex() Dim rSource As Range Set rSource = NamedRange(DATA_EXTRACT) Dim index As Long 'loop counter Dim rw As Long With MSFlexGrid1 .Cols = rSource.Columns.count .Rows = rSource.Rows.count .Row = 0 For index = 0 To .Cols - 1 .col = index .text = rSource.Cells(1, index + 1).Value Next For rw = 2 To rSource.Rows.count .Row = rw - 1 For index = 0 To .Cols - 1 .col = index .text = rSource.Cells(rw, index + 1).Value Next index Next rw End With End Sub here, DATA_EXTRACT is a constant,"Data.Extract" which in the workbook is a named range. HTH Patrick Molloy Microsoft Excel MVP -----Original Message----- Does the Datagrid control work when used on Excel UserForm? When I run my UserForm, the control is displayed but I am unable to enter any data. All of the microsoft docs I see only refer to VB use of the control, not VBA. Same question about the MOWC spreadsheet control. Thanks for your help, Mike . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can the flexgrid be used to accept input that the user
actually types into the grid? Thanks, Mike -----Original Message----- I have a flexgrid which I populate from a range thus: Private Sub LoadFlex() Dim rSource As Range Set rSource = NamedRange(DATA_EXTRACT) Dim index As Long 'loop counter Dim rw As Long With MSFlexGrid1 .Cols = rSource.Columns.count .Rows = rSource.Rows.count .Row = 0 For index = 0 To .Cols - 1 .col = index .text = rSource.Cells(1, index + 1).Value Next For rw = 2 To rSource.Rows.count .Row = rw - 1 For index = 0 To .Cols - 1 .col = index .text = rSource.Cells(rw, index + 1).Value Next index Next rw End With End Sub here, DATA_EXTRACT is a constant,"Data.Extract" which in the workbook is a named range. HTH Patrick Molloy Microsoft Excel MVP -----Original Message----- Does the Datagrid control work when used on Excel UserForm? When I run my UserForm, the control is displayed but I am unable to enter any data. All of the microsoft docs I see only refer to VB use of the control, not VBA. Same question about the MOWC spreadsheet control. Thanks for your help, Mike . . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not directly , you have to fake it by detecting the mouse down event at
the grid , superimposing a text box of the size of the active cell and use the lost focus event to update the grid. Keith wrote in message ... Can the flexgrid be used to accept input that the user actually types into the grid? Thanks, Mike -----Original Message----- I have a flexgrid which I populate from a range thus: Private Sub LoadFlex() Dim rSource As Range Set rSource = NamedRange(DATA_EXTRACT) Dim index As Long 'loop counter Dim rw As Long With MSFlexGrid1 .Cols = rSource.Columns.count .Rows = rSource.Rows.count .Row = 0 For index = 0 To .Cols - 1 .col = index .text = rSource.Cells(1, index + 1).Value Next For rw = 2 To rSource.Rows.count .Row = rw - 1 For index = 0 To .Cols - 1 .col = index .text = rSource.Cells(rw, index + 1).Value Next index Next rw End With End Sub here, DATA_EXTRACT is a constant,"Data.Extract" which in the workbook is a named range. HTH Patrick Molloy Microsoft Excel MVP -----Original Message----- Does the Datagrid control work when used on Excel UserForm? When I run my UserForm, the control is displayed but I am unable to enter any data. All of the microsoft docs I see only refer to VB use of the control, not VBA. Same question about the MOWC spreadsheet control. Thanks for your help, Mike . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 Form Control/ActiveX Control font difference | Excel Discussion (Misc queries) | |||
ActiveX Control text box | Excel Worksheet Functions | |||
ActiveX Control Compatibility | Excel Discussion (Misc queries) | |||
sumif from activeX control | Excel Worksheet Functions | |||
Tab to an ActiveX control? | Excel Discussion (Misc queries) |