ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Public subroutine called from a private sub (https://www.excelbanter.com/excel-programming/288100-public-subroutine-called-private-sub.html)

Neil Bhandar[_2_]

Public subroutine called from a private sub
 
Am I allowed to send values by ref from a private sub to a
public sub? Here is the sample code:

Prive Sub Blah()
Dim Entire as Boolean, Pages as Long

Jake Marx[_3_]

Public subroutine called from a private sub
 
Hi Neil,

With just the framework of your routines, I see nothing wrong (other than
the typo on "Private"). I assume something in your omitted code is causing
a problem. Please show us both subroutines and we can help you diagnose the
problem.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Neil Bhandar wrote:
Am I allowed to send values by ref from a private sub to a
public sub? Here is the sample code:

Prive Sub Blah()
Dim Entire as Boolean, Pages as Long
.
.
call genreport(Entire,Pages)
end sub

Sub genreport(Entire as Boolean, Pages as Long)
blah...
blah...
blah...
end sub

I get a type mismatch?? checked every nook and cranny. Any
help appreciated!

Thanks,
-Neil




All times are GMT +1. The time now is 04:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com