{"id":5597,"date":"2014-01-18T08:08:43","date_gmt":"2014-01-18T14:08:43","guid":{"rendered":"http:\/\/aplicaexcelcontable.com\/blog\/?p=5597"},"modified":"2024-12-07T19:24:07","modified_gmt":"2024-12-08T01:24:07","slug":"ejecutar-macro-desde-otra-macro","status":"publish","type":"post","link":"https:\/\/aplicaexcelcontable.com\/blog\/ejecutar-macro-desde-otra-macro.html","title":{"rendered":"Ejecutar macro desde otra macro"},"content":{"rendered":"<h1 style=\"text-align: center;\">Como Ejecutar Macro desde otra Macro<\/h1>\n<p style=\"text-align: justify;\">Comencemos con el articulo del&nbsp;<strong>Curso B\u00e1sico de VBA &#8211; Como Ejecutar Macro desde otra Macro:&nbsp;<\/strong>En los temas anteriores vimos como crear Formularios, como Ejecutarlas desde Excel.<\/p>\n<p style=\"text-align: justify;\">Y si todav\u00eda no has visto el tema anterior, te invito a que lo veas <span style=\"color: rgb(0, 23, 255);\"><a href=\"https:\/\/aplicaexcelcontable.com\/blog\/programar-en-excel-llamar-un-formulario-desde-excel.html\" style=\"outline: none;\" target=\"_blank\"><strong>pulsando clic aqu\u00ed<\/strong><\/a><\/span>. Una vez termines de leer y aplicar los pasos del tema anterior, regresa nuevamente aqu\u00ed y continua con el tema de hoy.<\/p>\n<p style=\"text-align: justify;\">Hoy vamos a conocer <strong>Como llamar y Ejecutar Macro desde otra Macro.<\/strong><\/p>\n<p><span style=\"width: 100%;\"><img loading=\"lazy\" decoding=\"async\" alt=\"Ejecutar Macro\" width=\"393\" height=\"370\" title=\"Ejecuci\u00f3n de Macros desde el Teclado\" data-id=\"42041\" src=\"https:\/\/aplicaexcelcontable.com\/blog\/wp-content\/uploads\/2019\/03\/Ejecuci\u00f3n-de-Macros-desde-el-Teclado.png\" style=\"aspect-ratio: auto 393 \/ 370;\" data-width=\"393\" data-height=\"370\" data-init-width=\"393\" data-init-height=\"370\"><\/span><\/p>\n<h2 style=\"text-align: center;\">Pasos para Ejecutar Macro desde otra Macro<\/h2>\n<p style=\"text-align: justify;\">Muchas veces nos interesa Ejecutar macro o llamar una Macro desde otra Macro.<\/p>\n<p style=\"text-align: justify;\">Esto es muy \u00fatil porque si tenemos un desarrollo muy grande, para mantener ordenado el c\u00f3digo conviene dividir la tarea en distintas Macros y luego vamos ejecutando la Macro que se necesite en cada momento.<\/p>\n<p style=\"text-align: justify;\">Para llamar una Macro desde otra Macro simplemente se escribe el nombre de la Macro invocada dentro del c\u00f3digo de la Macro principal. Por ejemplo, si ejecutamos la Macro1 y queremos que desde la misma se ejecute la Macro2 lo har\u00edamos as\u00ed:<\/p>\n<p style=\"text-align: justify;\">Sub Macro1()<\/p>\n<p style=\"text-align: justify;\">&#8216;El c\u00f3digo de mi Macro1<\/p>\n<p style=\"text-align: justify;\">Macro2<\/p>\n<p style=\"text-align: justify;\">End Sub<\/p>\n<p style=\"text-align: justify;\">Adem\u00e1s, si queremos identificar mejor que estamos llamando una Macro desde otra Macro podemos anteponer la palabra Call.<\/p>\n<p style=\"text-align: justify;\">El efecto es el mismo, solo que al anteponer la instrucci\u00f3n Call, la misma queda en azul autom\u00e1ticamente, y nos permite identificar mejor que estamos llamando otra Macro:<\/p>\n<p style=\"text-align: justify;\">Sub Macro1()<\/p>\n<p style=\"text-align: justify;\">&#8216;El c\u00f3digo de mi Macro1<\/p>\n<p style=\"text-align: justify;\">Call Macro2<\/p>\n<p style=\"text-align: justify;\">End Sub<\/p>\n<h3 style=\"text-align: center;\">Macros que realizan varias funciones &#8211; Ejecutar macro<\/h3>\n<p style=\"text-align: justify;\">Por ejemplo, tenemos una SuperMacro que realiza la siguiente funci\u00f3n sobre el rango seleccionado:<\/p>\n<ul>\n<li><span>1<\/span><span>Se asigna un Formato Num\u00e9rico.<\/span><\/li>\n<li><span>2<\/span><span>De igual forma asigna Bordes.<\/span><\/li>\n<li><span>3<\/span><span>Asigna color de relleno.<\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify;\">El c\u00f3digo de la SuperMacro es el siguiente:<\/p>\n<p style=\"text-align: justify;\">Sub SuperMacro()<\/p>\n<p style=\"text-align: justify;\">&#8216;Asigna Formato Num\u00e9rico<\/p>\n<p style=\"text-align: justify;\">Selection.NumberFormat = \u00ab#,##0;[Red]#,##0\u00bb<\/p>\n<p style=\"text-align: justify;\">&#8216;Asigna Bordes<\/p>\n<p style=\"text-align: justify;\">With Selection.Borders<\/p>\n<p style=\"text-align: justify;\">.LineStyle = xlContinuous<\/p>\n<p style=\"text-align: justify;\">.Weight = xlThin<\/p>\n<p style=\"text-align: justify;\">.ColorIndex = xlAutomatic<\/p>\n<p style=\"text-align: justify;\">End With<\/p>\n<p style=\"text-align: justify;\">&#8216;Asigna Color de Relleno<\/p>\n<p style=\"text-align: justify;\">With Selection.Interior<\/p>\n<p style=\"text-align: justify;\">.ColorIndex = 36<\/p>\n<p style=\"text-align: justify;\">.Pattern = xlSolid<\/p>\n<p style=\"text-align: justify;\">.PatternColorIndex = xlAutomatic<\/p>\n<p style=\"text-align: justify;\">End With<\/p>\n<p style=\"text-align: justify;\">End Sub<\/p>\n<h3 style=\"text-align: center;\">Simplificando Macros &#8211; Ejecutar macro<\/h3>\n<p style=\"text-align: justify;\">Esta SuperMacro podr\u00edamos simplificarla de tal forma que ejecute 3 MiniMacros:<\/p>\n<p style=\"text-align: justify;\">Sub SuperMacro()<\/p>\n<p style=\"text-align: justify;\">Call FormatoN<\/p>\n<p style=\"text-align: justify;\">Call Bordes<\/p>\n<p style=\"text-align: justify;\">Call Relleno<\/p>\n<p style=\"text-align: justify;\">End Sub<\/p>\n<p style=\"text-align: justify;\">La palabra Call se puede omitir pero recomendamos utilizarla para identificar mejor que estamos llamando otras Macros.<\/p>\n<p style=\"text-align: justify;\">Como se ve en el c\u00f3digo, la SuperMacro ejecuta 3 Macros. Estas 3 Macros deben estar ubicadas en el mismo m\u00f3dulo y las escribimos a continuaci\u00f3n:<\/p>\n<p style=\"text-align: justify;\">Sub FormatoN()<\/p>\n<p style=\"text-align: justify;\">&#8216;Asigna Formato Num\u00e9rico<\/p>\n<p style=\"text-align: justify;\">Selection.NumberFormat = \u00ab#,##0;[Red]#,##0\u00bb<\/p>\n<p style=\"text-align: justify;\">End Sub<\/p>\n<p style=\"text-align: justify;\">Sub Bordes()<\/p>\n<p style=\"text-align: justify;\">&#8216;Asigna Bordes<\/p>\n<p style=\"text-align: justify;\">With Selection.Borders<\/p>\n<p style=\"text-align: justify;\">.LineStyle = xlContinuous<\/p>\n<p style=\"text-align: justify;\">.Weight = xlThin<\/p>\n<p style=\"text-align: justify;\">.ColorIndex = xlAutomatic<\/p>\n<p style=\"text-align: justify;\">End With<\/p>\n<p style=\"text-align: justify;\">End Sub<\/p>\n<p style=\"text-align: justify;\">Sub Relleno()<\/p>\n<p style=\"text-align: justify;\">&#8216;Asigna Color de Relleno<\/p>\n<p style=\"text-align: justify;\">With Selection.Interior<\/p>\n<p style=\"text-align: justify;\">.ColorIndex = 36<\/p>\n<p style=\"text-align: justify;\">.Pattern = xlSolid<\/p>\n<p style=\"text-align: justify;\">.PatternColorIndex = xlAutomatic<\/p>\n<p style=\"text-align: justify;\">End With<\/p>\n<p style=\"text-align: justify;\">End Sub<\/p>\n<p style=\"text-align: justify;\">Muy bien, hasta aqu\u00ed con el tema de <strong>Como llamar Macro desde otra Macro<\/strong>, en el pr\u00f3ximo tema vamos a ver sobre \u00abDepuraci\u00f3n y Errores\u00bb.<\/p>\n<p style=\"text-align: justify;\">Si te ha gustado el tema de hoy, te invito a que lo compartas con tus amigos de Facebook pulsando clic en el bot\u00f3n compartir:<\/p>\n<p style=\"text-align: justify;\">Para finalizar, me gustar\u00eda saber que piensas de este articulo \u00abProgramar en Excel &#8211; Ejecutar Macro desde otra Macro\u00bb.<\/p>\n<p style=\"text-align: justify;\">Por lo tanto:<\/p>\n<p style=\"text-align: justify;\">D\u00e9jame tu comentario con dudas, cr\u00edticas constructivas y sugerencia en la secci\u00f3n de comentarios o bien en el Chat. Al mismo tiempo te invito a que visites nuestra pagina de Facebook, <span style=\"color: rgb(0, 23, 255);\"><a href=\"https:\/\/www.facebook.com\/AplicaExceContable\/\" target=\"_blank\" style=\"outline: none;\" rel=\"noopener\"><strong>pulsando clic aqu\u00ed<\/strong><\/a><\/span>.<\/p>\n<p style=\"\">Cualquier duda o pregunta, puedes escribirme directamente en la<span style=\"--tcb-text-highlight-color: rgb(237, 243, 13) !important;\">&nbsp;<\/span><a href=\"#comentario\" style=\"outline: none;\"><span style=\"--tcb-text-highlight-color: rgb(237, 243, 13) !important;\">secci\u00f3n de comentarios<\/span><\/a>, en la <a href=\"https:\/\/aplicaexcelcontable.com\/blog\/contacto\" target=\"_blank\" style=\"outline: none;\"><span style=\"--tcb-text-highlight-color: rgb(231, 100, 224) !important;\" data-text-highlight=\"bubble\">pagina del chat<\/span><\/a>, directamente en <span style=\"--tcb-text-highlight-color: rgb(30, 184, 76) !important;\">whatsapp<\/span> o bien al correo electr\u00f3nico rogerperez@aplicaexcelcontable.com.<span style=\"--tcb-text-highlight-color: transparent !important;\"><\/span><\/p>\n<p style=\"\">Te saluda,<span style=\"--tcb-text-highlight-color: transparent !important;\"><\/span><\/p>\n<p style=\"\"><strong>Roger Perez \u2013 Aplica Excel Contable<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Como Ejecutar Macro desde otra Macro Comencemos con el articulo del&nbsp;Curso B\u00e1sico de VBA &#8211; Como Ejecutar Macro desde otra Macro:&nbsp;En los temas anteriores vimos como crear Formularios, como Ejecutarlas desde Excel. Y si todav\u00eda no has visto el tema anterior, te invito a que lo veas pulsando clic aqu\u00ed. Una vez termines de leer [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":42041,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","tve_updated_post":"<div class=\"thrv_wrapper thrv_text_element\" data-tag=\"h1\"><h1 data-css=\"tve-u-162247a6b1c\" style=\"text-align: center;\" class=\"\">Como Ejecutar Macro desde otra Macro<\/h1><\/div><div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box\">\n<div class=\"tve-content-box-background\"><\/div>\n<div class=\"tve-cb tve_empty_dropzone\" data-css=\"tve-u-162247b215d\"><div class=\"thrv_wrapper thrv_text_element tve_empty_dropzone\"><p data-css=\"tve-u-162247b215f\" style=\"text-align: justify;\">Comencemos con el articulo del&nbsp;<strong>Curso B\u00e1sico de VBA - Como Ejecutar Macro desde otra Macro:&nbsp;<\/strong>En los temas anteriores vimos como crear Formularios, como Ejecutarlas desde Excel.<\/p><p data-css=\"tve-u-162247b215f\" style=\"text-align: justify;\">Y si todav\u00eda no has visto el tema anterior, te invito a que lo veas <span data-css=\"tve-u-162247d45aa\" style=\"color: rgb(0, 23, 255);\"><a href=\"https:\/\/aplicaexcelcontable.com\/blog\/programar-en-excel-llamar-un-formulario-desde-excel.html\" class=\"\" style=\"outline: none;\" target=\"_blank\"><strong>pulsando clic aqu\u00ed<\/strong><\/a><\/span>. Una vez termines de leer y aplicar los pasos del tema anterior, regresa nuevamente aqu\u00ed y continua con el tema de hoy.<\/p><p data-css=\"tve-u-162247b215f\" style=\"text-align: justify;\">Hoy vamos a conocer <strong>Como llamar y Ejecutar Macro desde otra Macro.<\/strong><\/p><\/div><\/div>\n<\/div><div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-169c00919e0\"><span class=\"tve_image_frame\" style=\"width: 100%;\"><img loading=\"lazy\" decoding=\"async\" class=\"tve_image wp-image-42041\" alt=\"Ejecutar Macro\" width=\"393\" height=\"370\" title=\"Ejecuci\u00f3n de Macros desde el Teclado\" data-id=\"42041\" src=\"https:\/\/aplicaexcelcontable.com\/blog\/wp-content\/uploads\/2019\/03\/Ejecuci\u00f3n-de-Macros-desde-el-Teclado.png\" style=\"aspect-ratio: auto 393 \/ 370;\" data-width=\"393\" data-height=\"370\" data-init-width=\"393\" data-init-height=\"370\"><\/span><\/div><div class=\"thrv_wrapper thrv_text_element\" data-tag=\"h2\"><h2 data-css=\"tve-u-16224829bd9\" style=\"text-align: center;\" class=\"\">Pasos para Ejecutar Macro desde otra Macro<\/h2><\/div><div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box\">\n<div class=\"tve-content-box-background\"><\/div>\n<div class=\"tve-cb tve_empty_dropzone\" data-css=\"tve-u-1622484d472\"><div class=\"thrv_wrapper thrv_text_element tve_empty_dropzone\"><p data-css=\"tve-u-1622484d476\" style=\"text-align: justify;\">Muchas veces nos interesa Ejecutar macro o llamar una Macro desde otra Macro.<\/p><p data-css=\"tve-u-1622484d476\" style=\"text-align: justify;\">Esto es muy \u00fatil porque si tenemos un desarrollo muy grande, para mantener ordenado el c\u00f3digo conviene dividir la tarea en distintas Macros y luego vamos ejecutando la Macro que se necesite en cada momento.<\/p><p data-css=\"tve-u-1622484d476\" style=\"text-align: justify;\">Para llamar una Macro desde otra Macro simplemente se escribe el nombre de la Macro invocada dentro del c\u00f3digo de la Macro principal. Por ejemplo, si ejecutamos la Macro1 y queremos que desde la misma se ejecute la Macro2 lo har\u00edamos as\u00ed:<\/p><p data-css=\"tve-u-1622484d476\" style=\"text-align: justify;\">Sub Macro1()<\/p><p data-css=\"tve-u-1622484d476\" style=\"text-align: justify;\">'El c\u00f3digo de mi Macro1<\/p><p data-css=\"tve-u-1622484d476\" style=\"text-align: justify;\">Macro2<\/p><p data-css=\"tve-u-1622484d476\" style=\"text-align: justify;\">End Sub<\/p><p data-css=\"tve-u-1622484d476\" style=\"text-align: justify;\">Adem\u00e1s, si queremos identificar mejor que estamos llamando una Macro desde otra Macro podemos anteponer la palabra Call.<\/p><p data-css=\"tve-u-1622484d476\" style=\"text-align: justify;\">El efecto es el mismo, solo que al anteponer la instrucci\u00f3n Call, la misma queda en azul autom\u00e1ticamente, y nos permite identificar mejor que estamos llamando otra Macro:<\/p><p data-css=\"tve-u-1622484d476\" style=\"text-align: justify;\">Sub Macro1()<\/p><p data-css=\"tve-u-1622484d476\" style=\"text-align: justify;\">'El c\u00f3digo de mi Macro1<\/p><p data-css=\"tve-u-1622484d476\" style=\"text-align: justify;\">Call Macro2<\/p><p data-css=\"tve-u-1622484d476\" style=\"text-align: justify;\">End Sub<\/p><\/div><\/div>\n<\/div><div class=\"thrv_wrapper thrv_text_element\" data-tag=\"h3\"><h3 data-css=\"tve-u-16224886e1a\" style=\"text-align: center;\" class=\"\">Macros que realizan varias funciones - Ejecutar macro<\/h3><\/div><div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box\">\n<div class=\"tve-content-box-background\"><\/div>\n<div class=\"tve-cb tve_empty_dropzone\" data-css=\"tve-u-16224898348\"><div class=\"thrv_wrapper thrv_text_element tve_empty_dropzone\"><p data-css=\"tve-u-16224898349\" style=\"text-align: justify;\">Por ejemplo, tenemos una SuperMacro que realiza la siguiente funci\u00f3n sobre el rango seleccionado:<\/p><\/div><\/div>\n<\/div><div class=\"thrv_wrapper thrv-numbered_list\" data-start-number=\"1\" data-number-increment=\"1\" data-css=\"tve-u-162248acb4e\" data-color=\"rgb(0, 0, 0)\"><ul class=\"tcb-numbered-list\"><li class=\"thrv-styled-list-item\"><div class=\"tcb-numbered-list-number thrv-disabled-label thrv_wrapper tcb-no-delete tcb-no-clone tve_no_drag\"><span class=\"tcb-numbered-list-index\">1<\/span><\/div><span class=\"thrv-advanced-inline-text tve_editable tcb-numbered-list-text tcb-no-delete\" data-css=\"tve-u-169c014188e\"><div style=\"text-align: justify;\">Se asigna un Formato Num\u00e9rico.<\/div><\/span><\/li><li class=\"thrv-styled-list-item\"><div class=\"tcb-numbered-list-number thrv-disabled-label thrv_wrapper tcb-no-delete tcb-no-clone tve_no_drag\"><span class=\"tcb-numbered-list-index\">2<\/span><\/div><span class=\"thrv-advanced-inline-text tve_editable tcb-numbered-list-text tcb-no-delete\" data-css=\"tve-u-169c014188e\"><div style=\"text-align: justify;\">De igual forma asigna Bordes.<\/div><\/span><\/li><li class=\"thrv-styled-list-item\"><div class=\"tcb-numbered-list-number thrv-disabled-label thrv_wrapper tcb-no-delete tcb-no-clone tve_no_drag\"><span class=\"tcb-numbered-list-index\">3<\/span><\/div><span class=\"thrv-advanced-inline-text tve_editable tcb-numbered-list-text tcb-no-delete\" data-css=\"tve-u-169c014188e\"><div style=\"text-align: justify;\">Asigna color de relleno.<\/div><\/span><\/li><\/ul><\/div><div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box\">\n<div class=\"tve-content-box-background\"><\/div>\n<div class=\"tve-cb tve_empty_dropzone\" data-css=\"tve-u-162248f5000\"><div class=\"thrv_wrapper thrv_text_element tve_empty_dropzone\"><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">El c\u00f3digo de la SuperMacro es el siguiente:<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">Sub SuperMacro()<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">'Asigna Formato Num\u00e9rico<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">Selection.NumberFormat = \"#,##0;[Red]#,##0\"<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">'Asigna Bordes<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">With Selection.Borders<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">.LineStyle = xlContinuous<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">.Weight = xlThin<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">.ColorIndex = xlAutomatic<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">End With<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">'Asigna Color de Relleno<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">With Selection.Interior<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">.ColorIndex = 36<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">.Pattern = xlSolid<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">.PatternColorIndex = xlAutomatic<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">End With<\/p><p data-css=\"tve-u-162248f5001\" style=\"text-align: justify;\">End Sub<\/p><\/div><\/div>\n<\/div><div class=\"thrv_wrapper thrv_text_element\" data-tag=\"h4\"><h3 class=\"\" style=\"text-align: center;\" data-css=\"tve-u-193a3dd48eb\">Simplificando Macros - Ejecutar macro<\/h3><\/div><div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box\">\n<div class=\"tve-content-box-background\"><\/div>\n<div class=\"tve-cb tve_empty_dropzone\" data-css=\"tve-u-162249fabf3\"><div class=\"thrv_wrapper thrv_text_element tve_empty_dropzone\"><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">Esta SuperMacro podr\u00edamos simplificarla de tal forma que ejecute 3 MiniMacros:<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">Sub SuperMacro()<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">Call FormatoN<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">Call Bordes<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">Call Relleno<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">End Sub<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">La palabra Call se puede omitir pero recomendamos utilizarla para identificar mejor que estamos llamando otras Macros.<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">Como se ve en el c\u00f3digo, la SuperMacro ejecuta 3 Macros. Estas 3 Macros deben estar ubicadas en el mismo m\u00f3dulo y las escribimos a continuaci\u00f3n:<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">Sub FormatoN()<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">'Asigna Formato Num\u00e9rico<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">Selection.NumberFormat = \"#,##0;[Red]#,##0\"<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">End Sub<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">Sub Bordes()<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">'Asigna Bordes<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">With Selection.Borders<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">.LineStyle = xlContinuous<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">.Weight = xlThin<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">.ColorIndex = xlAutomatic<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">End With<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">End Sub<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">Sub Relleno()<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">'Asigna Color de Relleno<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">With Selection.Interior<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">.ColorIndex = 36<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">.Pattern = xlSolid<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">.PatternColorIndex = xlAutomatic<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">End With<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">End Sub<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">Muy bien, hasta aqu\u00ed con el tema de <strong>Como llamar Macro desde otra Macro<\/strong>, en el pr\u00f3ximo tema vamos a ver sobre \"Depuraci\u00f3n y Errores\".<\/p><p data-css=\"tve-u-162249fabf5\" style=\"text-align: justify;\">Si te ha gustado el tema de hoy, te invito a que lo compartas con tus amigos de Facebook pulsando clic en el bot\u00f3n compartir:<\/p><\/div><\/div>\n<\/div><div class=\"thrv_wrapper thrv_social_custom thrv_social\" data-counts=\"\" data-min_shares=\"0\" data-css=\"tve-u-16224b7ccc8\">\n<div class=\"tve_social_items tve_social_custom tve_style_1 tve_social_itb\">\n<div class=\"tve_s_item tve_s_fb_share\" data-s=\"fb_share\" data-href=\"https:\/\/aplicaexcelcontable.com\/blog\/programar-en-excel-ejecutar-macro-desde-otra-macro.html\" data-label=\"Compartir\">\n<a href=\"javascript:void(0)\" class=\"tve_s_link\"><span class=\"tve_s_icon thrv-svg-icon\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"tcb-facebook\" viewBox=\"0 0 16 28\"><path d=\"M14.984 0.187v4.125h-2.453q-1.344 0-1.813 0.562t-0.469 1.687v2.953h4.578l-0.609 4.625h-3.969v11.859h-4.781v-11.859h-3.984v-4.625h3.984v-3.406q0-2.906 1.625-4.508t4.328-1.602q2.297 0 3.563 0.187z\"><\/path><\/svg><\/span><span class=\"tve_s_text\">Compartir<\/span><span class=\"tve_s_count\">0<\/span><\/a>\n<\/div>\n<\/div>\n<\/div><div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box\">\n<div class=\"tve-content-box-background\"><\/div>\n<div class=\"tve-cb tve_empty_dropzone\" data-css=\"tve-u-16224b825ed\"><div class=\"thrv_wrapper thrv_text_element tve_empty_dropzone\"><p data-css=\"tve-u-16224b825ef\" style=\"text-align: justify;\">Para finalizar, me gustar\u00eda saber que piensas de este articulo \"Programar en Excel - Ejecutar Macro desde otra Macro\".<\/p><p data-css=\"tve-u-16224b825ef\" style=\"text-align: justify;\">Por lo tanto:<\/p><p data-css=\"tve-u-16224b825ef\" style=\"text-align: justify;\">D\u00e9jame tu comentario con dudas, cr\u00edticas constructivas y sugerencia en la secci\u00f3n de comentarios o bien en el Chat. Al mismo tiempo te invito a que visites nuestra pagina de Facebook, <span data-css=\"tve-u-16224baff74\" style=\"color: rgb(0, 23, 255);\"><a href=\"https:\/\/www.facebook.com\/AplicaExceContable\/\" target=\"_blank\" class=\"\" style=\"outline: none;\"><strong>pulsando clic aqu\u00ed<\/strong><\/a><\/span>.<\/p><\/div><\/div>\n<\/div><div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box tve-elem-default-pad\" data-css=\"tve-u-193a3ddefe0\" style=\"\">\n\t<div class=\"tve-content-box-background\"><\/div>\n\t<div class=\"tve-cb\" style=\"\" data-css=\"tve-u-193a3ddefde\"><div class=\"thrv_wrapper thrv_text_element tcb-highlight-added\">\t<p style=\"\">Cualquier duda o pregunta, puedes escribirme directamente en la<span style=\"--tcb-text-highlight-color: rgb(237, 243, 13) !important;\" data-css=\"tve-u-193a3ddefe1\">&nbsp;<\/span><a href=\"#comentario\" class=\"tve-jump-scroll\" style=\"outline: none;\"><span style=\"--tcb-text-highlight-color: rgb(237, 243, 13) !important;\" data-css=\"tve-u-193a3ddefe2\">secci\u00f3n de comentarios<\/span><\/a>, en la <a href=\"https:\/\/aplicaexcelcontable.com\/blog\/contacto\" target=\"_blank\" class=\"\" style=\"outline: none;\"><span style=\"--tcb-text-highlight-color: rgb(231, 100, 224) !important;\" data-css=\"tve-u-193a3ddefe3\" data-text-highlight=\"bubble\">pagina del chat<\/span><\/a>, directamente en <span style=\"--tcb-text-highlight-color: rgb(30, 184, 76) !important;\" data-css=\"tve-u-193a3ddefe4\">whatsapp<\/span> o bien al correo electr\u00f3nico rogerperez@aplicaexcelcontable.com.<span style=\"--tcb-text-highlight-color: transparent !important;\" data-css=\"tve-u-193a3ddefe5\"><\/span><\/p><p style=\"\">Te saluda,<span style=\"--tcb-text-highlight-color: transparent !important;\"><\/span><\/p><p style=\"\"><strong>Roger Perez \u2013 Aplica Excel Contable<\/strong><\/p><\/div><\/div>\n<\/div>","tve_custom_css":"@media (min-width: 300px){[data-css=\"tve-u-16224baff74\"] { color: rgb(0, 23, 255) !important; }[data-css=\"tve-u-16224b7ccc8\"] { float: none; margin-left: auto !important; margin-right: auto !important; }:not(#tve) [data-css=\"tve-u-162248acb4e\"] p, :not(#tve) [data-css=\"tve-u-162248acb4e\"] li, :not(#tve) [data-css=\"tve-u-162248acb4e\"] blockquote, :not(#tve) [data-css=\"tve-u-162248acb4e\"] address, :not(#tve) [data-css=\"tve-u-162248acb4e\"] h1, :not(#tve) [data-css=\"tve-u-162248acb4e\"] h2, :not(#tve) [data-css=\"tve-u-162248acb4e\"] h3, :not(#tve) [data-css=\"tve-u-162248acb4e\"] h4, :not(#tve) [data-css=\"tve-u-162248acb4e\"] h5, :not(#tve) [data-css=\"tve-u-162248acb4e\"] h6 { color: rgb(0, 0, 0); }[data-css=\"tve-u-162248acb4e\"] .tcb-numbered-list-number { color: rgb(0, 0, 0); }:not(#tve) [data-css=\"tve-u-16224886e1a\"] { font-size: 32px !important; color: rgb(0, 23, 255) !important; }:not(#tve) [data-css=\"tve-u-16224829bd9\"] { font-size: 38px !important; color: rgb(0, 23, 255) !important; }[data-css=\"tve-u-162247d45aa\"] { color: rgb(0, 23, 255) !important; }:not(#tve) [data-css=\"tve-u-162247a6b1c\"] { font-size: 28px !important; color: rgb(255, 0, 0) !important; }[data-css=\"tve-u-162247b215d\"] p { margin: 0px 0px 11px !important; padding: 0px !important; }:not(#tve) [data-css=\"tve-u-162247b215f\"] { color: rgb(10, 0, 0) !important; }[data-css=\"tve-u-1622484d472\"] p { margin: 0px 0px 11px !important; padding: 0px !important; }:not(#tve) [data-css=\"tve-u-1622484d476\"] { color: rgb(10, 0, 0) !important; }[data-css=\"tve-u-16224898348\"] p { margin: 0px 0px 11px !important; padding: 0px !important; }:not(#tve) [data-css=\"tve-u-16224898349\"] { color: rgb(10, 0, 0) !important; }[data-css=\"tve-u-162248f5000\"] p { margin: 0px 0px 11px !important; padding: 0px !important; }:not(#tve) [data-css=\"tve-u-162248f5001\"] { color: rgb(10, 0, 0) !important; }[data-css=\"tve-u-162249fabf3\"] p { margin: 0px 0px 11px !important; padding: 0px !important; }:not(#tve) [data-css=\"tve-u-162249fabf5\"] { color: rgb(10, 0, 0) !important; }[data-css=\"tve-u-16224b825ed\"] p { margin: 0px 0px 11px !important; padding: 0px !important; }:not(#tve) [data-css=\"tve-u-16224b825ef\"] { color: rgb(10, 0, 0) !important; }[data-css=\"tve-u-169c00919e0\"] { width: 393px; float: none; margin-left: auto !important; margin-right: auto !important; }:not(#tve) [data-css=\"tve-u-162248acb4e\"] li { color: rgb(10, 0, 0) !important; }.tcb-post-list[data-css=\"tve-u-186df1bf84d\"] .post-wrapper.thrv_wrapper { width: calc(100% + 0px); }.tcb-post-list[data-css=\"tve-u-186df1bf84d\"] .post-wrapper.thrv_wrapper:nth-child(n+2) { margin-top: 50px !important; }.tcb-post-list[data-css=\"tve-u-186df1bf84d\"] .post-wrapper.thrv_wrapper:not(:nth-child(n+2)) { margin-top: 0px !important; }.tcb-post-list[data-css=\"tve-u-186df1bf84d\"] .post-wrapper.thrv_wrapper:not(:nth-child(n)) { margin-right: 30px !important; }.tcb-post-list[data-css=\"tve-u-186df1bf84d\"] .post-wrapper.thrv_wrapper:nth-child(n) { margin-right: 0px !important; }.tcb-post-list[data-css=\"tve-u-18703fb75db\"] .post-wrapper.thrv_wrapper { width: calc(33.3333% - 13.3333px); }.tcb-post-list[data-css=\"tve-u-18703fb75db\"] .post-wrapper.thrv_wrapper:nth-child(n+4) { margin-top: 20px !important; }.tcb-post-list[data-css=\"tve-u-18703fb75db\"] .post-wrapper.thrv_wrapper:not(:nth-child(n+4)) { margin-top: 0px !important; }.tcb-post-list[data-css=\"tve-u-18703fb75db\"] .post-wrapper.thrv_wrapper:not(:nth-child(3n)) { margin-right: 20px !important; }.tcb-post-list[data-css=\"tve-u-18703fb75db\"] .post-wrapper.thrv_wrapper:nth-child(3n) { margin-right: 0px !important; }:not(#tve) [data-css=\"tve-u-193a3dd48eb\"] { font-size: 32px !important; color: rgb(36, 10, 233) !important; --tcb-applied-color: rgb(36, 10, 233) !important; --tve-applied-color: rgb(36, 10, 233) !important; }:not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] p, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] li, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] blockquote, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] address, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] .tcb-plain-text, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] label { font-size: var(--tve-font-size,20px); }[data-css=\"tve-u-193a3ddefde\"] { --tve-font-size: 20px; --tve-color: rgb(7,0,0); --tve-applied---tve-color: rgb(7,0,0); text-align: justify; }:not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] p, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] li, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] blockquote, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] address, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] .tcb-plain-text, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] label, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] h1, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] h2, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] h3, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] h4, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] h5, :not(#tve) .thrv-content-box [data-css=\"tve-u-193a3ddefde\"] h6 { color: var(--tve-color,rgb(7,0,0)); --tve-applied-color: var$(--tve-color,rgb(7,0,0)); --tcb-applied-color: rgb(7,0,0); }[data-css=\"tve-u-193a3ddefde\"] p { padding: 0px 0px 11px !important; margin: 0px !important; }[data-css=\"tve-u-193a3ddefe0\"] { margin-top: 20px !important; margin-bottom: 20px !important; padding: 0px !important; }[data-css=\"tve-u-193a3ddefe1\"] { --tcb-text-highlight-color: rgb(237, 243, 13) !important; }[data-css=\"tve-u-193a3ddefe2\"] { --tcb-text-highlight-color: rgb(237, 243, 13) !important; }[data-css=\"tve-u-193a3ddefe3\"] { --tve-highlight-background: url(\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20314%20114%22%20preserveAspectRatio%3D'none'%3E%0A%09%09%09%09%09%3Cpath%20d%3D%22M149.412%202.398C98.053%204.579%2074.996%207.562%2053.903%2014.754%2028.892%2023.283%208.503%2040.617%202.929%2058.09c-4.148%2013.004-.464%2026.402%2010.207%2037.118%205.664%205.687%2015.228%2012.328%2021.753%2015.104%202.939%201.25%208.598%202.708%2010.559%202.72%201.16.008%201.111-.129-.909-2.543-2.554-3.05-4.753-7.567-4.761-9.775-.008-2.502%202.482-6.937%204.862-8.661%205.613-4.066%2020.333-6.115%2050.607-7.046%2012.81-.394%2019.622.068%2047.623%203.231%2057%206.439%2066.925%207.222%2091.845%207.248%2016.516.016%2020.951-.139%2026.167-.919%2020.12-3.007%2032.633-8.401%2041.489-17.883%206.859-7.344%2010.154-16.516%2010.254-28.537.032-3.902-.231-7.704-.651-9.42-5.257-21.464-31.961-33.668-80.137-36.622-11.85-.727-62.651-.546-82.425.293%22%2F%3E%0A%09%09%09%09%3C%2Fsvg%3E\"); --tcb-text-highlight-color: #2ABB61 !important; }[data-css=\"tve-u-193a3ddefe4\"] { --tcb-text-highlight-color: rgb(30, 184, 76) !important; }[data-css=\"tve-u-193a3ddefe5\"] { --tcb-text-highlight-color: transparent !important; }}@media (max-width: 1023px){:not(#tve) [data-css=\"tve-u-162247a6b1c\"] { font-size: 25px !important; }:not(#tve) [data-css=\"tve-u-16224829bd9\"] { font-size: 22px !important; }:not(#tve) [data-css=\"tve-u-16224886e1a\"] { font-size: 22px !important; }}@media (max-width: 767px){:not(#tve) [data-css=\"tve-u-16224886e1a\"] { font-size: 20px !important; }:not(#tve) [data-css=\"tve-u-16224829bd9\"] { font-size: 20px !important; }:not(#tve) [data-css=\"tve-u-162247a6b1c\"] { font-size: 23px !important; }}","tve_user_custom_css":"","tve_globals":{"e":"1","font_cls":[]},"tcb2_ready":1,"tcb_editor_enabled":1,"tve_landing_page":"","_tve_header":"","_tve_footer":""},"categories":[22,4],"tags":[293,292,27,12,295,294],"class_list":["post-5597","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-curso-basico-de-vba","category-programar-en-excel","tag-aprender-excel","tag-excel-y-contabilidad","tag-macros","tag-macros-en-excel","tag-plantillas-excel","tag-programar-en-excel","post-wrapper","thrv_wrapper"],"_links":{"self":[{"href":"https:\/\/aplicaexcelcontable.com\/blog\/wp-json\/wp\/v2\/posts\/5597","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aplicaexcelcontable.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aplicaexcelcontable.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aplicaexcelcontable.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aplicaexcelcontable.com\/blog\/wp-json\/wp\/v2\/comments?post=5597"}],"version-history":[{"count":0,"href":"https:\/\/aplicaexcelcontable.com\/blog\/wp-json\/wp\/v2\/posts\/5597\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aplicaexcelcontable.com\/blog\/wp-json\/wp\/v2\/media\/42041"}],"wp:attachment":[{"href":"https:\/\/aplicaexcelcontable.com\/blog\/wp-json\/wp\/v2\/media?parent=5597"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aplicaexcelcontable.com\/blog\/wp-json\/wp\/v2\/categories?post=5597"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aplicaexcelcontable.com\/blog\/wp-json\/wp\/v2\/tags?post=5597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}