Jump to content

Report

  • Crear macros Excel

  • Posts

    • 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??
    • Sub CopiarMúltiple() Application.ScreenUpdating = False Range("C3:I7").Copy For x = 12 To 4998 Step 9 Range("C" & x).PasteSpecial xlPasteAll Next Application.CutCopyMode = False End Sub  
    • Janlui, muy bueno funciona perfecto eso lo que necesitaba magnifico...
    • Sub Concatenar() Dim fn As Long uFila = Range("H" & Cells.Rows.Count).End(xlUp).Row pFila = 1 For fila = pFila + 1 To uFila     fn = Range("I" & fila)     Range("O" & fila) = Range("H" & fila) & fn Next fila End Sub    
    • Buenas tardes, expertos solicito una ayuda para concatenar dos columnas una de ellas es en cuanto a la fechas, lo que pasa es que la macro que tengo concatena muy bien, solo tengo un inconveniente con las fechas dicha columna (I) estas formateadas por ejemplo asi: Feb-20 pero al concatenar el resultado asi: O-2AA6220/09/2021, pero asi no quiero, me gustaria concatenar que salga asi: A-234RV44032 los 5 ultimos digitos son de la fecha, bueno asi me gustaria que quede, la macro que estoy usando es: Sub Concatenar() uFila = Range("H" & Cells.Rows.Count).End(xlUp).Row pFila = 1 For fila = pFila + 1 To uFila     Range("O" & fila) = Range("H" & fila) & Range("I" & fila) Next fila End Sub Por favor si me podria dar una ayuda estare muy agradecido. Adjunto el archivo Consolidado.xlsm
  • Recently Browsing

    No registered users viewing this page.

×
×
  • Create New...

Important Information

Privacy Policy