LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Controlsource errors

Hello,
Ive several TextBoxes and ListBoxes linked to named cells in my
registration form.
Everything worked fine but suddenly when initiating the form I get the error
380: Could not set the ControlSource property. Invalid property value.
It doesnt matter how Im referencing to the cell in ControlSource, with a
variable, with the cell Name, with the cell range, the error pops anyway.
It seems like any value or string in the controlsource cell triggers the
error.
It happens to OptionButtons as well. A True or False value in the cell Poff!

But as said, it was working before! Does ControlSource get contaminated
with usage? I tried with VBACleaner as well but it didnt help very much. I
got other strange errors instead. (I could get the form to work if I opened
the workbook from within Excel, but if I started Excel with the
workbook-shortcut it didnt work + other strange errors like not loading
startup files.)

A part of the code looks like:

Dim MD, RecOrder, RecDate, DelTime, CompIX, WHAT
Public Sub Userform_Initialize()
Sheets("DocSys").Activate
Set MD = Worksheets("DocSys") Main Document
Set CompIX = MD.Range("CompIX")
Set WHAT = MD.Range("WHAT")
Set RecOrder = MD.Range("RecOrder")
Set RecDate = MD.Range("RecDate")
Set RecDate = MD.Range("DelTime")

TextBox5.ControlSource = MD.Range(A4)
TextBox6.ControlSource = RecOrder
TextBox7.ControlSource = MD.Range("RecDate")
TextBox8.ControlSource = DelTime
OptionButton1.ControlSource = WHAT
With ListBox1
.ColumnCount = 2
.ColumnWidths = "0;72"
.RowSource = "Database"
.ControlSource = CompIX
.BoundColumn = 0
End With

What has happened? Its very problematic to have empty cells as other
formulas are depending on an index value set by f.i. the ListBox. Errors in
these formulas triggers Type Mismatch instead.

Can anybody come up with a good solution?
Regards
Mats

 
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
Format & ControlSource Oskar von dem Hagen[_2_] Excel Programming 1 May 26th 05 09:53 AM
ControlSource Greg[_20_] Excel Programming 2 April 2nd 05 04:57 AM
Controlsource David Coleman Excel Programming 5 December 28th 03 01:14 PM
ControlSource Compatibility VBA - VB6 John M[_4_] Excel Programming 2 October 19th 03 05:30 PM
ControlSource problem Christy[_2_] Excel Programming 1 August 28th 03 03:44 AM


All times are GMT +1. The time now is 09:39 PM.

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"