PLease help...Trying to compile a module

Sausagefingers

Registered User.
Local time
Today, 02:44
Joined
Dec 14, 2006
Messages
51
Hi,
I'm under a bit of pressure to get this job done so I'm asking for help rather than spending too much time scouring the net. The solution should be obvious to me by now, but I can't for the life of me figure out what is missing...

I'm working with charts and graphs in Access 2k and have downloaded a suitable module for my needs.

Trouble is, when I try to compile I get a simple error:

"Expected: identifier"

These two lines appear to be problematic:

"Public Function ChartObject(ByVal ReportName As String, _

ByVal ChartObjectName As String)"


I think a reference is missing but not sure which.

Can someone offer me an urgently needed solution?

Thanks in advance.
 
I don't see a real problem with the two lines of code that might cause an error. Except: is there a line with nothing on it between the 2 lines (as displayed in the forum)? If so, get rid of it. Also, you're using quote marks, seemingly to indicate this is an exact quote from your code. If the quote marks are part of your code, get rid of them.

Also, this won't cause an error but wouldn't it be best to explicitly state the return type for this function?

So, these 2 lines should look something like:
Code:
Public Function ChartObject(ByVal ReportName As String, _
ByVal ChartObjectName As String) as Variant
 
Thanks, the line spacing was indeed the problem. I now feel very stupid for not realizing this.

Thanks again.
 

Users who are viewing this thread

Back
Top Bottom