Need "ActiveX Control GUID" of Calendar Control 11.0, so I can ena

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have added the Calendar Contol 11.0 to an access 2003 application, but when
I run it on another computer, it does not work. I did a search in Help, and
it says to create a module file (named EnableActiveXControl) but you need to
enter the ActiveX Control GUID (see code below). I do not know what the GUID
is, or how to find it. If anyone knows how to do this, or a better way to
add a calendar to a form, please let me know.

Module Code:
Sub EnableActiveXControl()

SysCmd 14, "<ActiveX Control GUID>"

End Sub

Thanks in advance to anyone who can help me.
 
Create this function:

Function GetGUID(Optional ByVal RefName As String = "VBA")

Dim Ref As Access.Reference
'RefName = "VBA"
Set Ref = Access.References(RefName)
Debug.Print Ref.Guid
Debug.Print Ref.Name
GetGUID = Ref.Guid

End Function

HTH

Pieter
 
oops forgot that it's not a reference

guid: {8E27C92B-1264-101C-8A2F-040224009C02}

hth
Pieter
 
Pieter, unfortunately I am just a beginner at this, so do not understand the
code you wrote, or how to use it. I entered the code you gave me, and then
tried to run it, but nothing seemed to happen.

I found this code using Help in VBA editor, and it is similar to what you
gave me:

Public Sub StringValueOfGUID()

Dim ctl As Control
Dim strGUID As String

' Get the GUID.
Set ctl = Forms!CalendarRequest!s_GUID
Debug.Print TypeName(ctl.Value)

' Convert the GUID to a string.
strGUID = StringFromGUID(ctl.Value)
Debug.Print TypeName(strGUID)

End Sub

But i got the error "Microsoft Office Access can't tind the field "s_GUID"
referred to in your expression.

What am I doing wrong (besides asking dumb questions...)

John
 
Back
Top