Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Curious use of ByVal keyword in VBA event
I have a WithEvents combo object in a class and I'm using its KeyPress
events. Here is the line VBA inserted into my code: Private Sub m_oCombo_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) The KeyAscii variable is actually being passed by reference, of course, otherwise I wouldn't be able to suppress certain characters. So why the ByVal keyword? It confused me for a while this morning. Is it this something to do with ByVal being overloaded e.g. for use in the Declare keyword? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
REPSOT?? Sub Worksheet_Change(ByVal Target As Range) | Excel Discussion (Misc queries) | |||
Control Toolbox and Private Sub Worksheet_Change(ByVal Target As R | Excel Discussion (Misc queries) | |||
Control Toolbox and Private Sub Worksheet_Change(ByVal Target | Excel Discussion (Misc queries) | |||
ByVal Target Range Great Code but need Help | Excel Discussion (Misc queries) | |||
Is ByVal always better if ByRef isn't necessary | Excel Programming |