Passing a Worksheet to a subroutine

I have the following code:

Private Sub SortWorksheet(ByVal sheet As Worksheet)
    Dim sStartColumn
    Dim iTopRow
    Dim sEndColumn
    Dim iBottomRow
    Dim Rng As Range
    Dim sRange1 As String

and I am calling the function like so:

SortWorksheet (DestSheet)

I am getting a runtime error on the above line saying "Object doesn't support this property or method"

DestSheet is a worksheet variable.

Why is this code not working?


Disregard, apparently in VBA the subroutine has be called like this

SortWorksheet DestSheet

Hey, I'm a C/C++/C# guy! :)

Need Your Help

Handling a syscall via ASM (x86) (ebp needed)

linux assembly linux-kernel cpu-registers system-calls

On x64 I handle syscalls (I hook syscalls and then call them myself) by reserving some space on the stack and copying all the arguments (6) to the stack. I save all the arguments so I can use them ...

How to put background in a navigation bar

css list html background nav

I am trying to put a solid white background behind this navagation bar so when it scrolls it does not show whats behind it.