The first set of code in the online documentation is incomplete. There was
a cut and paste problem. Here's the complete set of code for the Form_Load
function.
' Declare variable for the calendar control.
Private WithEvents oCal As MSACAL.Calendar
' Declare global variables for the Inventor document and Application.
Private WithEvents oDocEvents As DocumentEvents
Private oPane As BrowserPane
Private oApp As Inventor.Application
Private Sub Form_Load()
' Set a reference to a running instance of Inventor.
' This expects Inventor to be running.
Set oApp = GetObject(, "Inventor.Application")
' Get the active document. This assumes a document is open.
Dim oDoc As Inventor.Document
Set oDoc = oApp.ActiveDocument
' Connect to the documents events. Used to
' listen for when the document is closed.
Set oDocEvents = oDoc.DocumentEvents
' Create a new browser pane using the Microsoft calendar control.
Set oPane = oDoc.BrowserPanes.Add("Calendar", "MSCAL.Calendar")
' Set a reference to the calendar control
' that was created on the pane.
Set oCal = oPane.Control
' Set the calendar to todays date.
oCal.Today
' Make the new pane the active pane.
oPane.Activate
End Sub
-Brian
"Wayne" wrote in message
news:9197A3E6E0888B7B74BCD6C4351E3EBF@in.WebX.maYIadrTaRb...
> It works from within IV ide but not from within a browser pane i have
> programmed in visual basic
> any ideas
> Wayne
> "Kent Keller" wrote in message
> news:C090B45AE4CCA440201CAEC312CDAB47@in.WebX.maYIadrTaRb...
> > Wayne
> >
> > I have tried that one before, and it worked fine for me. Not sure what
> could be going
> > wrong for you though?
> >
> > --
> > Kent
> >
> >
> > "Wayne" wrote in message
> > news:D2E88C926A9FE935D91A974DADBF4DC8@in.WebX.maYIadrTaRb...
> > > AutoBolts didnt do the trick for me either but maybe you can tell me
the
> > > example from the API help file that uses the MSCal control is there
info
> > > missing from that doucment as it doesnt say how to actually add the
> control
> > > to the prowser pane it seems to miss out a section of important info.
??
> > >
> > > Wayne
> >
> >
> >
>
>