Syntax Error On VB Subroutine Call?

In my Visual Basic code behind an Excel spreadsheet, I have one subroutine which takes parameters. This is called from another subroutine.

Here is the subroutine declaration:

Sub rowPasting(ByVal oldRow As Integer, ByVal newRow As Integer, ByVal oldSheet As Worksheet, ByVal newSheet As Worksheet)

Here is the call:

rowPasting(j,k,TTWorksheet,newSheet)

All the variables I use as inputs for the parameters are set and valid because they were used for working parts of the program before I tried to add this new Subroutine.

Any ideas on what is causing the syntax error on the call?

Answers


To call your subroutine you need to use one of the following syntax:

Call rowPasting(j,k,TTWorksheet,newSheet)

or

rowPasting j,k,TTWorksheet,newSheet

Need Your Help

Linking .lib of MySQL in C/C

c++ mysql visual-studio static linker

So, after whole day of trial and effort, I still couldn't figure answer to this question.

SUID issues with PHP + Apache

php apache exec file-permissions

Ok, not sure what I am missing here. I'm trying to rename some files with a web accessible PHP script, without giving world write permissions on those files. So I'm trying to use SUID on a PHP scr...