Guest - Aline - Posted July 30, 2004 Report Share Posted July 30, 2004 Como faço para passar um controle por parâmetro para uma sub.Por exemplo, preciso passar uma Grid por prâmetro. E estou fazendo da seguinte forma:Call Configurar_Grid (MSFlexGrid1)Private Sub Configurar_Grid (Grid as MSFlexGrid)Mas ocorre o erro "Type mismatch"Obrigada Quote Link to comment Share on other sites More sharing options...
0 Manwë Súlimo Posted July 30, 2004 Report Share Posted July 30, 2004 faça o seguinte:Call Configurar_Grid (MSFlexGrid1) Private Sub Configurar_Grid (Grid as Object) quando se passa objetos para uma função ou sub, você tem que definir o tipo como objetoaté mais Quote Link to comment Share on other sites More sharing options...
0 Graymalkin Posted July 31, 2004 Report Share Posted July 31, 2004 Como faço para passar um controle por parâmetro para uma sub.Por exemplo, preciso passar uma Grid por prâmetro. E estou fazendo da seguinte forma:Call Configurar_Grid (MSFlexGrid1)Private Sub Configurar_Grid (Grid as MSFlexGrid)Mas ocorre o erro "Type mismatch"Obrigada Seu código está correto. Fiz o teste aqui. De qualquer forma, experimente chamar a rotina assim:Configurar_Grid MSFlexGrid1Ao invés de usar "Call...".Abraços,Graymalkin Quote Link to comment Share on other sites More sharing options...
Question
Guest - Aline -
Como faço para passar um controle por parâmetro para uma sub.
Por exemplo, preciso passar uma Grid por prâmetro. E estou fazendo da seguinte forma:
Call Configurar_Grid (MSFlexGrid1)
Private Sub Configurar_Grid (Grid as MSFlexGrid)
Mas ocorre o erro "Type mismatch"
Obrigada
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.