porque vb tira este error?

Iniciado por ricardovinzo, 24 Junio 2008, 01:11 AM

0 Miembros y 1 Visitante están viendo este tema.

ricardovinzo

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Declare Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameA" (ByVal hModule As Long, ByVal lpFileName As String, ByVal nSize As Long) As Long
Private Declare Function GetWindowWord Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long) As Integer
Const GWW_HINSTANCE = (-6)
Const SW_SHOWHIDE = 0

Dim Firma As String
Dim subfirma As String

Private Function Ruta() As String
    Dim ModuleName As String, FileName As String, hInst As Long
    ModuleName = String$(128, Chr$(0))
    hInst = GetWindowWord(Me.hwnd, GWW_HINSTANCE)
    ModuleName = Left$(ModuleName, GetModuleFileName(hInst, ModuleName, Len(ModuleName)))
    Ruta = ModuleName
End Function

Private Sub Form_Load()
If App.PrevInstance = True Then
    End
End If
Dim parte As Variant, subparte As Variant
Dim opc() As String
Dim mensa() As String
Firma = "||vbcteam||"
subfirma = "|@|@|"

Open Ruta For Binary As #1
    Dim todo As String
        todo = Space(LOF(1))
    Get #1, , todo
Close #1

parte = Split(todo, Firma)
    For i = 1 To UBound(parte)
        subparte = Split(parte(i), "|@vbc@|")
Next
opc = Split(subparte(3), subfirma)
If opc(0) <> "" Then
    MsgBox opc(0), opc(1), opc(2)
End If
End Sub


opc = Split(subparte(3), subfirma)

bueno disculpen, pero tratando de crear un joiner, spliteando una variable me tira un error de type mismatch, e tratado cambian la variable opc por variant y opc() as string pero nada a que se deb esto?

gracias!
3# Convocacion de Moderadores en Code Makers, entra!