Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Datagrid ActiveX Control

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Datagrid ActiveX Control

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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Datagrid ActiveX Control

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default Datagrid ActiveX Control

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2007 Form Control/ActiveX Control font difference Nikko963 Excel Discussion (Misc queries) 0 April 15th 09 04:21 PM
ActiveX Control text box Mary Thomas Excel Worksheet Functions 6 September 21st 08 12:15 PM
ActiveX Control Compatibility Racer49 Excel Discussion (Misc queries) 4 May 26th 07 05:32 AM
sumif from activeX control CraigSA Excel Worksheet Functions 1 March 31st 06 01:47 PM
Tab to an ActiveX control? Karin Excel Discussion (Misc queries) 0 July 6th 05 05:08 AM


All times are GMT +1. The time now is 10:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"