View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default type mixturte in ByReference argument

Change the first jmacro

Sub chartID(i As Integer)
Dim s As String, t As String
If i = 0 Then
s = "Mod Dur"
t= "test"
Call findAndRemoveBlanks(s)
Call hittaRubriker(s, t)


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Fabrizio" wrote in message
...
OK I get this error message "type mixturte in ByReference argument". The
code is:

Sub chartID(i As Integer)
Dim s, t As String
If i = 0 Then
s = "Mod Dur"
t= "test"
Call findAndRemoveBlanks(s)
Call hittaRubriker(s, t)

........

Public Sub findAndRemoveBlanks(s As String)
Dim WB As Workbook
Dim SH As Worksheet
Dim rng, rCell As Range

...........

Private Sub hittaRubriker(s, t As String)
MsgBox t
MsgBox s

see the first sub chartID gets an integer i. This sub then defines the
strings s and t and then calls first one sub and passes s. then it calls
another sub and passes both s and t. There is something wrong here but I

dont
know where... all subs that are called takes string. please help me.
Yours sincerly
Fabrizio S