Results 1 to 3 of 3

Thread: ActiveX and Databases

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2000
    Location
    London
    Posts
    24

    Unhappy

    I'm trying to get a string value from a prompt in an ActiveX control I recently created to use in another form.

    I just can't seem to get the value though - how do I link the activeX to the other form?

    Frustrated,

    Sash

  2. #2
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    can you not reference the property in the ActiveX control, i.e. MyNewValue = Control.Property1??

    post some source code Sash (if you've got any)...
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2000
    Location
    London
    Posts
    24

    Smile Retrieving a value from an activeX control.

    Thanks for that, I couldn't find anything about retrieving values from an activeX control in any of the VB books I had.
    Typical!!

    My script is simple, and I'm not a great VB programmer but I am trying to learn. If you know a better way of doing this please tell me.


    Option Explicit
    Dim filepath As String
    Dim file As String
    Dim entirepath As String

    'Getting a value for a path from a path chooser form.

    Private Sub Dir1_Change()

    File1.Path = Dir1.Path
    filepath = File1.Path
    Text1.Text = filepath

    End Sub

    Private Sub Drive1_Change()

    Dir1.Path = Drive1.Drive

    End Sub

    Private Sub File1_Click()

    file = File1.FileName
    Text1.Text = filepath & "\" & file

    End Sub

    Private Sub UserControl_Initialize()

    Text1.Text = Drive1.Drive

    End Sub



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width