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:


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?


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

Call rowPasting(j,k,TTWorksheet,newSheet)


rowPasting j,k,TTWorksheet,newSheet

Need Your Help

Is there a way to access the SOL_TCP (AKA IPPROTO_TCP) socket options (e.g. TCP_KEEPIDLE) in Java?

java sockets tcp

I want to be able to set the TCP socket KEEPALIVE parameters (TCP_KEEPIDLE, TCP_KEEPINTVL, and TCP_KEEPCNT) but these don't appear to be available in the Socket class. Based on the documentation o...

Which construction for iteration is better to use in Scala?

performance scala coding-style

Recently, I've start to code a lot of my programming competitions in Scala. (You could take a look at platform here -

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.