pls Help on this VBA issue

I have been trying to get help on this but didnt got any help till now
can any one of you pls help regarding this

I have some requirements inwhich i have used picture box application
in VB and now i have to do same application and i am looking for a
picture box application in VBA excel which i am not able to get it. If
it is not in VBA excel is there any alternative for it ...or is there
any special dll or addin i need to have or is there any possible way
to have picture box or parallel application for VBA Excel.

or is there any way i can wrap picture box application in VB and use it in VBA.
I have tried image box control in VBA but its not helpful ...


Now i am not a really coder in VB so if any one of you cud please help
how to achieve this with steps that wud be really grateful

Thank you

Amit

Comments

  • This is what I "would do" in your case. (But that's me).

    1. I would make a VB6 ActiveX, and put the PictureBox inside of it.
    2. Write a lot of Public Properties with the PictureBox properties ("wrap"/encapsulate). Ex:
    [code]Public Function TheWidth() As Integer
    TheWidth = myPictureBox.Width()
    End Function[/code]
    3. From Excel I would write VBA code to get an instance of my ActiveX, and insert the object into the excel worksheet. Ex:
    [code]Public Sub ButtonClickedTest()
    Dim MyActiveX As Object
    Set MyActiveX = CreateObject("MyActiveX.App...")
    [color=Green] ' OR: ActiveWorkbook.Worksheets(1).OLEObjects.Add
    ' ClassType:="MyActiveX.App...", _
    ' Link:=False, DisplayAsIcon:=False, Left:=40, Top:=40, _
    ' Width:=150, Height:=10[/color]
    Dim TheWidthFromActiveX = MyActiveX.TheWidth()
    [color=Green] ' OR: Dim TheWidthFromActiveX = _
    ' ActiveSheet.OLEObjects("MyActiveX.App...").Object. TheWidth()[/color]
    End Sub[/code]
    4. From there, I could write events to modify, update the PictureBox inside my ActiveX from Excel in VBA code.

    [red]Good luck![/red]
    [blue]Hackman[/blue]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion