Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Problem encounter in VB AsynRead

Posted on 1997-11-30
1
Medium Priority
?
235 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

876 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