Calendar control problems when workbook is shared?

L

Legacy 98055

Guest
Hi.
This workbook brings up a calendar whenever the user selects a single cell in a specific range. It works fine as is. However, when the workbook is shared the code fails. The errors are occuring whenever the Left or Top properties of the control are assigned new values.(These values will vary depending on the user's range selection.)
Any ideas?
Thanks,
Tom<pre>
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim r As Long, c As Integer
If CheckBox1 Then Exit Sub
If Selection.Rows.Count<> 1 Then
Calendar1.Visible = False
Exit Sub
End If
r = Target.Row
c = Target.Column
If c = 3 And r > 6 Then
Calendar1.Value = Now
Calendar1.Refresh
Calendar1.Left = Cells(r, c + 1).Left + 5
If Cells(r, c).Top - (Calendar1.Height / 2) > 79 Then
Calendar1.Top = Cells(r, c).Top - (Calendar1.Height / 2)
Else
Calendar1.Top = 79.5
End If
Calendar1.Visible = True
End If
End Sub</pre>
This message was edited by TsTom on 2002-08-27 13:11
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Tom, I have the same problem with a workbook of my own, when shared some of the macros don't work, I know you can't edit macros when the workbook is shared but what other functionality does sharing the workbook take away?

Brett
 
Upvote 0
Brett - if you go into the Excel Help: Workbooks, shared - there's a section on the limitations of shared workbooks.
 
Upvote 0
Hi everybody.
I guess you figured out that the control is embedded. Waiting patiently.......
:)


Starl, I could not find anything in help which might apply to this situation???
This message was edited by TsTom on 2002-08-27 17:45
 
Upvote 0
Tom, I could get it to work using a Userform, and I embed the Calendar in it. You could use the FormFun examples from Stephen Bullen to not display the caption, and other stuff... the problem I had was locating it exactly under the selected cell...
 
Upvote 0

Forum statistics

Threads
1,203,174
Messages
6,053,920
Members
444,694
Latest member
JacquiDaly

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