Other users can't see my VBA Coded "project" in Excel.

Soldato
Joined
19 Jun 2004
Posts
19,437
Location
On the Amiga500
Hi,

I'm not well versed in VBA coding but I've created a popup calendar to appear in different cells in my excel spreadsheet. It is a form entry under forms. It works fine for me but when anyone else opens the spreadsheet with thier login (local intranet), they get a code error. It's showing that the calendar script is not there. I've set the security to low. What is it I'm doing wrong?

Cheers
 
Private Sub Worksheet_Change(ByVal Target As Range)

Set MyPlage = Range("C4:C999")

For Each Cell In MyPlage

Select Case Cell.Value

Case Is = "ARMY"
Cell.EntireRow.Interior.ColorIndex = 35

Case Is = "RAF"
Cell.EntireRow.Interior.ColorIndex = 34

Case Is = "RN"
Cell.EntireRow.Interior.ColorIndex = 37

Case Else
Cell.EntireRow.Interior.ColorIndex = xlNone

End Select

Next


End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 10 Then
Call OpenCalendar

End If

If Target.Column = 17 Then
Call OpenCalendar

End If
If Target.Column = 18 Then
Call OpenCalendar

End If
If Target.Column = 19 Then
Call OpenCalendar

End If

If Target.Column = 21 Then
Call OpenCalendar

End If

If Target.Column = 23 Then
Call OpenCalendar

End If

If Target.Column = 24 Then
Call OpenCalendar

End If

If Target.Column = 27 Then
Call OpenCalendar

End If

If Target.Column = 28 Then
Call OpenCalendar

End If

If Target.Column = 29 Then
Call OpenCalendar

End If

If Target.Column = 30 Then
Call OpenCalendar

End If

If Target.Column = 31 Then
Call OpenCalendar

End If

If Target.Column = 34 Then
Call OpenCalendar

End If

If Target.Column = 35 Then
Call OpenCalendar

End If



End Sub

The highlighted part is what is throwing up the error (Excel 2003 :( )
 
Is it in a different module?

Try:

Code:
Call Module1.OpenCalendar

Where Module1 is the name of the module it's saved in
 
It's in a userform not module. Sorry I bet this is like pulling teeth. I've not really used vba before so just learning off the cuff.
 
So the name of the userform is "OpenCalendar"? If so try changing your code from

Code:
Call OpenCalendar

to:

Code:
OpenCalendar.Show


It's quite tricky trying to debug without the file in front of me. I'd be happy to take a look if you can upload it somewhere. Don't forget to strip out any confidential info...
 
So the name of the userform is "OpenCalendar"? If so try changing your code from

Code:
Call OpenCalendar

to:

Code:
OpenCalendar.Show


It's quite tricky trying to debug without the file in front of me. I'd be happy to take a look if you can upload it somewhere. Don't forget to strip out any confidential info...

Ha, that would be all the data in the workbook then as I have pretty much every personal detail for every member of staff in my spreadsheet here :p

Would you mind if I dropped you an email with this on Monday afternoon if I haven't sorted it that morning? (I'm home for the weekend now). Thank you!
 
Sure, my email is in my trust :)

One last thing... are your colleagues using a different version of Excel? It looks like 2013 doesn't have the calendar additional control included any more, you need an additional download from Microsoft.
 
Back
Top Bottom