Saltar al contenido

Call Function


Recommended Posts

publicado

I want to Call a routine that I have it into a UserForm. But I tried to call from a Module and I'm receiving a error msg.

This is the routine that I have inside a CommandButton of the UserForm

Public Sub HO_Issuance()
Set myCell = ActiveCell
myCell.Value = "TAILBOARD "
ActiveCell.Offset(2, 0).Select
Selection.Value = "THIS IS " & TextBox_OIC.Value & " INFORMING " & TextBox_EIC.Value
ActiveCell.Offset(1, 0).Select
Selection.Value = "THAT THE RECLOSING HAS BEEN DISABLED ON " & TextBox_Feeder.Value
ActiveCell.Offset(1, 0).Select
Selection.Value = "UNDER HOLD-OFF # " & ActiveSheet.Range("J2").Value
ActiveCell.Offset(2, 0).Select
End Sub

 

And this is the other that I have in a Module trying  to Call HO_Issuance, but I got the error msg "Compile error" " Sub or Function not defined"

Sub TAKE_OUT_REG(control As IRibbonControl)
Set myCell = ActiveCell
If myCell.Column = 5 And myCell.Row > 8 Then
myCell.Value = "TAILBOARD"
ActiveCell.Offset(2, 0).Select
Selection.Value = "CHECK VOLTAGE OK TO PROCEED"
ActiveCell.Offset(2, 0).Select
Selection.Value = "TURN REGULATOR TO MANUAL"
ActiveCell.Offset(2, 0).Select
Selection.Value = "SET REGULATOR TO NEUTRAL"
ActiveCell.Offset(2, 0).Select
Selection.Value = "PHASING CHECKS"
ActiveCell.Offset(2, 0).Select
Selection.Value = "CLOSE DSC BYPASS SWITCH"
ActiveCell.Offset(2, 0).Select
Selection.Value = "OPEN IN/OUT DSC SWITCH"
ActiveCell.Offset(2, 0).Select
Call HO_Issuance
Else: MsgBox "This statement is not meant to be placed into this cell"
End If
End Sub

Any ideas??

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

×
×
  • Crear nuevo...

Información importante

Echa un vistazo a nuestra política de cookies para ayudarte a tener una mejor experiencia de navegación. Puedes ajustar aquí la configuración. Pulsa el botón Aceptar, si estás de acuerdo.