Solved

Problem encounter in VB AsynRead

Posted on 1997-11-30
1
222 Views
Last Modified: 2008-03-06
I am developing a actice-x control which can perform downloading  . But everytime I get this error message : A Property or method call cannot include a reference to a private object, either as a argument or as a return value .

Below is my code :

Command1_Click()
   a = SourcePath
   SourcePath = a
End Sub

Public Property Get SourcePath() As String
    SourcePath = m_SourcePath
End Property

Public Property Let SourcePath(ByVal New_SourcePath As String)
     
       MstrPictureFromURL = New_SourcePath
        ' If program is in run mode, and the URL string
        ' is not empty, begin the download.
       AsyncRead New_SourcePath, vbAsyncTypePicture, _
            "SourcePath"

 PropertyChanged "SourcePath"
End Property
0
Comment
Question by:pcseah
1 Comment
 
LVL 8

Accepted Solution

by:
mrmick earned 100 total points
ID: 1443098
I'm assuming the problem is in the line:

AsyncRead New_SourcePath, vbAsyncTypePicture, "SourcePath"

Try this instead (parens around New_SourcePath):

AsyncRead (New_SourcePath), vbAsyncTypePicture, "SourcePath"

What is the "MstrPictureFromURL"?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now