Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello and Help:
I wrote VBA code (Excel 2000 SR1) which connected UserForms with textboxes to worksheet cells. In a moment of insanity, I decided to also convert this to VB6. Now, after successfully “getting” an existing Excel Workbook, the ControlSource property is problematic – except possibly for those cells which were originally null. The Error encountered is that “Could not set the ControlSource property. Invalid property value.” Do I need a different syntax for referring to a Worksheet Cell? There are no spaces or other “unacceptable” characters in the sheet name. Am I inheriting a restriction? These are UserForms in the Designer Folder of vb6. They are not VB6 Forms. As an example: frmInputCompletion.txtWHwrtRT.ControlSource = xlSheet.Range("C3") gives an error. Any help would be greatly appreciated. Sincerely John M. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
John,
rowsource/controlsource need a string, so you'd have to give the range's address. to be safe i'd advise you to give it a fully qualified adress. assuming xlsheet is a worksheet variable.. == xlsheet.Range("c3").address(external:=true) keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool John M wrote: Hello and Help: I wrote VBA code (Excel 2000 SR1) which connected UserForms with textboxes to worksheet cells. In a moment of insanity, I decided to also convert this to VB6. Now, after successfully “getting” an existing Excel Workbook, the ControlSource property is problematic – except possibly for those cells which were originally null. The Error encountered is that “Could not set the ControlSource property. Invalid property value.” Do I need a different syntax for referring to a Worksheet Cell? There are no spaces or other “unacceptable” characters in the sheet name. Am I inheriting a restriction? These are UserForms in the Designer Folder of vb6. They are not VB6 Forms. As an example: frmInputCompletion.txtWHwrtRT.ControlSource = xlSheet.Range("C3") gives an error. Any help would be greatly appreciated. Sincerely John M. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Dear keepITcool: Thanks for the advice. I tried this and I am still receiving the same error. I can see that it is pointing to the correct worksheet cell. It seems more insidious! As I try it now, I am even having trouble with these UserForms in design view in the VB6 DE. If you have any other suggestions, they would be appreciated. John M. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Testing Reverse Compatibility and Compatibility in General | Excel Discussion (Misc queries) | |||
Change UserForm ControlSource with VBA | Excel Discussion (Misc queries) | |||
ControlSource problem | Excel Programming | |||
Basic Userform Controlsource question | Excel Programming | |||
Valid ControlSource values | Excel Programming |