Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88075

Error passing a value between 2 subroutine

$
0
0

I'm trying to pass a String between 2 sub in VBA, but everytime I got a compilation Error

This is my code

Option Explicit

Private Sub ComboBox1_DropButtonClick()
    Dim value As String
    value = ComboBox1.value
    ComboBox1_Change value
End Sub

Private Sub ComboBox1_Change(ByVal value As String)
    Dim value2 As String
    value2 = value
End Sub

I am getting the below error

The routine declaration does not match the description of the event or routine of the same name

I've tried to remove ByVal but still nothing... Some tips?


Viewing all articles
Browse latest Browse all 88075

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>