Saltar al contenido
PROGRAMAR EN VBA MACROS DE EXCEL

Como Filtrar por Cliente Rango de Fechas Enviar Mail con Gmail y PDF Adjunto # 488

Filtrar Excel por Fechas Enviar Reporte Gmail

En esta macro de ejemplo se muestra Como Filtrar por Cliente Rango de Fechas y Enviar Reporte con PDF Adjunto Usando Gmail, si así como leíste usando el popular correo Gmail.

Existen en programarexcel.com muchos ejemplos que permite enviar mail con Excel, si requieres profundizar en el tema, haz click en el link.

Para manejar Excel en forma eficiente haz click acá, si quieres aprender sobre Excel, en inglés, entonces debes hacer click here. Si lo que necesitas es aprender o profundizar sobre la programación de macros con VBA este es unos de los mejores cursos on line que he visto en internet, te lo recomiendo no te arrepentirás.  

Mira la Macro en acción Suscribe a nuestro canal para que YouTube te avise cuando se suba nuevo contenido al canal, en el vídeo encontrarás una explicación gráfica y detallada del ejemplo que se muestra en este post.

 

 

Que hace exactamente la macro de ejemplo Como Filtrar por Cliente y Entre Dos Fechas, Enviando PDF Adjunto del Reporte Utilizando Gmail

Antes que nada conviene descargar el Libro Excel con la Macro, lo cual lo puedes hacer desde el link del final en forma gratis, una vez abierto el Libro de Excel se observará un botón el cual presionándolo se ejecutará un formulario de Excel, el cual tiene tres botones, uno para Filtrar por cliente, el segundo para enviar mail y el tercero para salir del formulario vba excel, además de textbox que se utilizan para ingresar el nombre del cliente, producto, proveedor o lo que se que quisiéramos listar.

El listbox de Excel que también se encuentra en el userform, permite mostrar los datos filtrados, es decir al ingresar el cliente en el primer Textbox y a medida que se va introduciendo el texto, se van buscando los datos coincidentes en la base de datos, que en este caso está en la hoja 1.Si quisiéramos agregarle un filtro por rango de fecha al filtro anterior, se debe ingresar la fecha en los Textbox destinados para ello y luego apretar el primer botón para ejecutar el filtro por fecha, en este caso el filtro incorporará el nombre del cliente más el rango de fechas, es decir se mostrarán registros que coincidan con el rango de fecha y cliente seleccionado.

Filtrados los datos o no, tal vez se requiere enviar todos los datos del listbox, presionando el icono que alude a Gmail, se procede a generar un reporte con dos datos filtrados, creando un pdf, enviando un mail utilizando GMAIL, adjuntando el archivo PDF creado, este PDF como es temporal se elimina, conjuntamente con la hoja de Excel que se usa para armar el reporte.

 

⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛⇛

Quizá sea de utilidad también

Como Enviar Mail con Firma e Imagen Guardada en Nuestra PC
Como Enviar Mail con Tabla en el Cuerpo del Mensaje Con Excel desde Outlook

Código de Excel VBA para Filtrar por Cliente una Base de Datos Excel Filtrar por Fecha y Enviar Mail con PDF adjunto.

El filtro por cliente y fecha se explica con detalle en los siguientes post por lo que no vamos a detenernos en ello:Como filtrar Por Cliente y Rango de FechasComo filtrar Por Cliente y Rango de Fechas y totalizar en listboxSe explicará con mayor detalle como crear un PDF y el envió de mail usando GMAIL, pero antes debes tener habilitadas las refeerencias que se muestran a continuación, para ello debes ir al Editor de VBA (Alt + F11), seleccionar el menú Herramientas luego Referencias y constata que tengas las mismas referencias que la imagen siguiente, si no las tienes búscalas y tilda para habilitar la referencia.

 

Al presionar el botón para enviar mail con el logo de Gmail, la macro se ejecuta y en primer lugar determina si se ingresó el mail en la casilla correspondiente en caso negativo avisa que debe ingresar mail y termina la macro sin ejecutar nada, en caso que se hay ingresado sigue, los códigos usados son:

If TextBox4 = Empty Then

MsgBox («Debe ingresar mail»), vbCritical, «AVISO»

Exit Sub

End If

Luego se procede a crear una hoja temporal que es donde la macro creará el reporte de Excel, los códigos siguientes crean una hoja al final le otorgan el nombre reporte, debe tener la precaución que si usted tiene una hoja reporte dará error, cambié en el código el nombre de la hoja que crea a temporal, temp o la que se le ocurra ya que la macro la eliminará al final, los códigos son:

ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)

ActiveSheet.name = «Reporte»

Set a = Sheets(«Reporte»)

Luego se crea y se arregla un poco el reporte, que es lo que se enviará por mail, acá queda a criterio de cada uno poner lo que necesiten, lo principal es que pasa los datos del listbox a la hoja de Excel, usando los siguientes códigos VBA Excel:

 

For x = 1 To UserForm1.ListBox1.ListCount – 5

a.Cells(x + 2, «A») = ListBox1.List(x, 0)

a.Cells(x + 2, «B») = CDate(ListBox1.List(x, 1))

a.Cells(x + 2, «C») = ListBox1.List(x, 2)

a.Cells(x + 2, «D») = ListBox1.List(x, 3)

a.Cells(x + 2, «E») = ListBox1.List(x, 4)

a.Cells(x + 2, «F») = ListBox1.List(x, 5)

a.Cells(x + 2, «G») = CDec(ListBox1.List(x, 6))

Next

Luego se crea el nombre del archivo con el que se guardará el PDF que se creará y enviará como adjunto, la macro lo elimina al final, si se requiere dejarlo en la PC comentar o eliminar el comando Kill del final:

sn = ActiveSheet.name

mydoc = ThisWorkbook.Path & «» & sn & «.pdf»

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=mydoc, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False

Ahora la macro envía el mail con GMAIL, para ello establece el destinatario que lo obtiene del textbox donde ingresamos el mail, establece el servidor SMTP saliente para poder enviar el mail, se configura el puerto, es importante que en la parte de autenticación modifiques la macro agregando tu nombre de correo y contraseña, debes modificar lo resaltado en azúl y dice «TU CORREO GMAIL» Y «TU CLAVE«

Dest = Me.TextBox4

Set Email = New CDO.Message

Email.Configuration.Fields(cdoSMTPServer) = «smtp.gmail.com» ‘Gmail

Email.Configuration.Fields(cdoSendUsingMethod) = 2

Email.Configuration.Fields.Item(«http://schemas.microsoft.com/cdo/configuration/smtpserverport») = CLng(465) ‘gmail

Email.Configuration.Fields.Item(«http://schemas.microsoft.com/cdo/» & «configuration/smtpauthenticate») = Abs(1)

Email.Configuration.Fields.Item(«http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout») = 30

Auten = True

If Auten Then

Email.Configuration.Fields.Item(«http://schemas.microsoft.com/cdo/configuration/sendusername») = «TUCorreoGMAIL» ‘ ej «marcrodos@gmail.com» debes ingresar correo desde donde envias el mail

                    Email.Configuration.Fields.Item(«http://schemas.microsoft.com/cdo/configuration/sendpassword») = «TuCLAVE«

Email.Configuration.Fields.Item(«http://schemas.microsoft.com/cdo/configuration/smtpusessl») = True

End If

Email.To = Dest

Email.From = «TuCORREO» ‘Es el mismo que usas para loguearte

Email.Subject = «Reporte de Movimientos»

Email.TextBody = «Estimado, en el archivo adjunto se encuentra el reporte de los últimos movimientos de su cuenta, confirmar recepción»

Email.AddAttachment mydoc

Email.Configuration.Fields.Update

Email.Send

If Err.Number = 0 Then

MsgBox «El mail con archivo adjunto fue enviado con éxito», vbInformation, «AVISO»

Else

MsgBox «Se produjo el siguiente error: » & Err.Description, vbCritical, «Error nro » & Err.Number

End If

Enviado el mail se procede a eliminar el documento PDF adjuntado, con el comando KILL si se quiere dejar el archivo en la PC se debe eliminar o comentar el código ( Poner un apostrofe ‘), luego se elimina la hoja temporal que creo el reporte, si no se desea eliminar se debe borrar o comentar el código:

Kill mydoc

a.Delete

El código completo del ejemplo Filtrar en Excel por Rango de Fechas y Enviar Mail con GMAIL, se muestra a continuación y en forma posterior se encuentra el link para descargar el ejemplo en forma GRATUITA como todos los ejemplos de esta página WEB.

Código que se inserta en un Formulario de VBAPrivate Sub CommandButton1_Click()Unload MeEnd Sub
Private Sub CommandButton2_Click()On Error Resume NextSet b = Sheets(«Hoja1»)uf = b.Range(«A» & Rows.Count).End(xlUp).Rowdato1 = CDate(TextBox2)dato2 = CDate(TextBox3)If dato2 = Empty Or dato1 = emtpy ThenMsgBox («Debe ingresar datos para consulta entre rango de fechas»), vbCritical, «AVISO»Exit SubEnd IfIf dato2 < dato1 ThenMsgBox («La fecha final no puede ser mayor a la fecha inicial»), vbCritical, «AVISO»Exit SubEnd If
b.AutoFilterMode = FalseMe.ListBox1 = ClearMe.ListBox1.RowSource = Clear
‘Adiciona un item al listbox reservado para la cabeceraUserForm1.ListBox1.AddItem
For i = 2 To uf   strg = b.Cells(i, 1).Value   dato0 = CDate(b.Cells(i, 2).Value)   If UCase(strg) Like UCase(TextBox1.Value) & «*» And dato0 >= dato1 And dato0 <= dato2 Then       Me.ListBox1.AddItem b.Cells(i, 1)       Me.ListBox1.List(Me.ListBox1.ListCount – 1, 1) = b.Cells(i, 2)       Me.ListBox1.List(Me.ListBox1.ListCount – 1, 2) = b.Cells(i, 3)       Me.ListBox1.List(Me.ListBox1.ListCount – 1, 3) = b.Cells(i, 4)       Me.ListBox1.List(Me.ListBox1.ListCount – 1, 4) = b.Cells(i, 5)       Me.ListBox1.List(Me.ListBox1.ListCount – 1, 5) = b.Cells(i, 6)       Me.ListBox1.List(Me.ListBox1.ListCount – 1, 6) = b.Cells(i, 7)   End IfNext i’Carga los datos de la cabecera en listboxFor ii = 0 To 7UserForm1.ListBox1.List(0, ii) = Sheets(«Hoja1»).Cells(1, ii + 1)Next iiUserForm1.ListBox1.AddItemUserForm1.ListBox1.AddItemUserForm1.ListBox1.AddItemUserForm1.ListBox1.List(UserForm1.ListBox1.ListCount – 1, 0) = «Total Importe»For x = 0 To UserForm1.ListBox1.ListCount – 1t = CDec(UserForm1.ListBox1.List(x, 6))tot = tot + tt = 0Next xUserForm1.ListBox1.List(UserForm1.ListBox1.ListCount – 1, 1) = Format(tot, » «»U$S»» #,##0.00 «)UserForm1.ListBox1.AddItemUserForm1.ListBox1.List(UserForm1.ListBox1.ListCount – 1, 0) = «Total de registros:»UserForm1.ListBox1.List(UserForm1.ListBox1.ListCount – 1, 1) = UserForm1.ListBox1.ListCount – 5Me.ListBox1.ColumnWidths = «170 pt;70 pt;50 pt;50 pt;50 pt;50 pt;50 pt»End Sub
Private Sub CommandButton3_Click()Unload UserForm1End Sub
Private Sub CommandButton4_Click()Application.ScreenUpdating = FalseApplication.DisplayAlerts = FalseOn Error Resume Next
Dim Email As CDO.Message, Auten As Boolean, Dest As String, mydoc As String
If TextBox4 = Empty ThenMsgBox («Debe ingresar mail»), vbCritical, «AVISO»Exit SubEnd If
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)ActiveSheet.name = «Reporte»Set a = Sheets(«Reporte»)
For x = 1 To UserForm1.ListBox1.ListCount – 5a.Cells(x + 2, «A») = ListBox1.List(x, 0)a.Cells(x + 2, «B») = CDate(ListBox1.List(x, 1))a.Cells(x + 2, «C») = ListBox1.List(x, 2)a.Cells(x + 2, «D») = ListBox1.List(x, 3)a.Cells(x + 2, «E») = ListBox1.List(x, 4)a.Cells(x + 2, «F») = ListBox1.List(x, 5)a.Cells(x + 2, «G») = CDec(ListBox1.List(x, 6))Next
a.Cells(x + 4, «A») = ListBox1.List(x + 2, 0)a.Cells(x + 5, «A») = ListBox1.List(x + 3, 0)a.Cells(x + 4, «B») = ListBox1.List(x + 2, 1)a.Cells(x + 5, «B») = ListBox1.List(x + 3, 1)
a.Activatea.Range(«A1») = «REPORTE DE VENTAS»
With a.Range(«A1:G1»).Merge.VerticalAlignment = xlCenter.HorizontalAlignment = xlCenter.RowHeight = 20.Font.Size = 16End With
a.Range(«A2») = «CLIENTE»a.Range(«B2») = «FECHA»a.Range(«C2») = «COMPROBANTE»a.Range(«D2») = «TIPO»a.Range(«E2») = «SUC»a.Range(«F2») = «N COMP»a.Range(«G2») = «IMPORTE»uf = a.Range(«G» & Rows.Count).End(xlUp).Rowa.Range(«G2:G» & uf).NumberFormat = «#.#,0″a.Range(«B2:B» & uf).NumberFormat = «dd/mm/yyyy»a.Range(«A:G»).Columns.AutoFita.Range(«A:A»).ColumnWidth = 31
sn = ActiveSheet.namemydoc = ThisWorkbook.Path & «» & sn & «.pdf»ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=mydoc, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False

Dest = Me.TextBox4

Set Email = New CDO.Message

Email.Configuration.Fields(cdoSMTPServer) = «smtp.gmail.com» ‘Gmail

Email.Configuration.Fields(cdoSendUsingMethod) = 2

Email.Configuration.Fields.Item(«http://schemas.microsoft.com/cdo/configuration/smtpserverport») = CLng(465) ‘gmail

Email.Configuration.Fields.Item(«http://schemas.microsoft.com/cdo/» & «configuration/smtpauthenticate») = Abs(1)

Email.Configuration.Fields.Item(«http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout») = 30

Auten = True

If Auten Then

Email.Configuration.Fields.Item(«http://schemas.microsoft.com/cdo/configuration/sendusername») = «TUCorreoGMAIL» ‘ ej «marcrodos@gmail.com» debes ingresar correo desde donde envias el mail

              Email.Configuration.Fields.Item(«http://schemas.microsoft.com/cdo/configuration/sendpassword») = «TuCLAVE»

Email.Configuration.Fields.Item(«http://schemas.microsoft.com/cdo/configuration/smtpusessl») = True

End If

Email.To = Dest

Email.From = «TuCORREO» ‘Es el mismo que usas para loguearte

Email.Subject = «Reporte de Movimientos»

Email.TextBody = «Estimado, en el archivo adjunto se encuentra el reporte de los últimos movimientos de su cuenta, confirmar recepción»

Email.AddAttachment mydoc

Email.Configuration.Fields.Update

Email.Send

If Err.Number = 0 Then

MsgBox «El mail con archivo adjunto fue enviado con éxito», vbInformation, «AVISO»

Else

MsgBox «Se produjo el siguiente error: » & Err.Description, vbCritical, «Error nro » & Err.Number

End If

Kill mydoc

a.Delete

Sheets(«Hoja1»).Select

Application.DisplayAlerts = True

Application.ScreenUpdating = True

End Sub

 

Private Sub Label2_Click()

TextBox4.SetFocus

End Sub

Private Sub ListBox3_Click()

On Error Resume Next

UserForm1.TextBox4 = Empty

fila = UserForm1.ListBox3.ListIndex

UserForm1.TextBox4 = UserForm1.ListBox3.List(fila, 1)

UserForm1.ListBox3.Visible = False

If TextBox4 = Empty Then

UserForm1.Label2.Visible = True ‘hace visible el label

Else

UserForm1.Label2.Visible = False

End If

 

If TextBox8 = Empty Then

UserForm1.Label1.Visible = True ‘hace visible el label

Else

UserForm1.Label1.Visible = False

End If

Me.CommandButton4.SetFocus

End Sub

Private Sub TextBox1_Change()

On Error Resume Next

Set b = Sheets(«Hoja1»)

uf = b.Range(«A» & Rows.Count).End(xlUp).Row

If Trim(TextBox1.Value) = «» Then

   Me.ListBox1.RowSource = «Hoja1!A1:G» & uf

   Exit Sub

End If

 

 

b.AutoFilterMode = False

Me.ListBox1 = Clear

Me.ListBox1.RowSource = Clear

dato1 = CDate(TextBox2)

dato2 = CDate(TextBox3)

‘Adiciona un item al listbox reservado para la cabecera

UserForm1.ListBox1.AddItem

 

For i = 2 To uf

   strg = b.Cells(i, 1).Value

   If UCase(strg) Like UCase(TextBox1.Value) & «*» Then

       Me.ListBox1.AddItem b.Cells(i, 1)

       Me.ListBox1.List(Me.ListBox1.ListCount – 1, 1) = b.Cells(i, 2)

       Me.ListBox1.List(Me.ListBox1.ListCount – 1, 2) = b.Cells(i, 3)

       Me.ListBox1.List(Me.ListBox1.ListCount – 1, 3) = b.Cells(i, 4)

       Me.ListBox1.List(Me.ListBox1.ListCount – 1, 4) = b.Cells(i, 5)

       Me.ListBox1.List(Me.ListBox1.ListCount – 1, 5) = b.Cells(i, 6)

       Me.ListBox1.List(Me.ListBox1.ListCount – 1, 6) = b.Cells(i, 7)

   End If

Next i

‘Carga los datos de la cabecera en listbox

For ii = 0 To 7

UserForm1.ListBox1.List(0, ii) = Sheets(«Hoja1»).Cells(1, ii + 1)

Next ii

UserForm1.ListBox1.AddItem

UserForm1.ListBox1.AddItem

UserForm1.ListBox1.AddItem

UserForm1.ListBox1.List(UserForm1.ListBox1.ListCount – 1, 0) = «Total Importe»

 

For x = 0 To UserForm1.ListBox1.ListCount – 1

t = CDec(UserForm1.ListBox1.List(x, 6))

tot = tot + t

t = 0

Next x

UserForm1.ListBox1.List(UserForm1.ListBox1.ListCount – 1, 1) = Format(tot, » «»U$S»» #,##0.00 «)

 

UserForm1.ListBox1.AddItem

UserForm1.ListBox1.List(UserForm1.ListBox1.ListCount – 1, 0) = «Total de registros:»

UserForm1.ListBox1.List(UserForm1.ListBox1.ListCount – 1, 1) = UserForm1.ListBox1.ListCount – 5

UserForm1.TextBox2 = Clear

UserForm1.TextBox3 = Clear

Me.ListBox1.ColumnWidths = «170 pt;70 pt;50 pt;50 pt;50 pt;50 pt;50 pt»

End Sub

 

Private Sub TextBox2_Change()

If Len(UserForm1.TextBox2) = 10 Then UserForm1.TextBox3.SetFocus

End Sub

 

Private Sub TextBox3_Change()

If Len(UserForm1.TextBox3) = 10 Then UserForm1.CommandButton2.SetFocus

End Sub

 

Private Sub TextBox4_Change()

Application.ScreenUpdating = False

Application.DisplayAlerts = False

On Error Resume Next

Dim cn As ADODB.Connection, rs As ADODB.Recordset

 

If TextBox4 = Empty Then

UserForm1.Label2.Visible = True ‘hace visible el label

Else

UserForm1.Label2.Visible = False

End If

 

If Len(UserForm1.TextBox4) <= 2 Then

UserForm1.ListBox3.Visible = False

Exit Sub

Else

UserForm1.ListBox3.Visible = True

End If

 

Set cn = New ADODB.Connection

Set rs = New ADODB.Recordset

Set a = Sheets(«Agenda»)

 

cn.Open «Provider=Microsoft.ACE.OLEDB.12.0;» & «Data Source=» & ThisWorkbook.FullName & «;Extended Properties=»»Excel 12.0;HDR=Yes;»»»

 

If Len(UserForm1.TextBox4) > 2 Then

Sql = «SELECT * FROM [» & «Agenda$» & «] WHERE Ucase(» & a.Range(«A1») & «) LIKE Ucase(‘%» & UserForm1.TextBox4 & «%’) ORDER BY Nombre ASC»

Set rs = cn.Execute(Sql)

UserForm1.ListBox3.Clear

If rs.EOF = True Then

rs.Close

Set rs = Nothing

cn.Close

Set cn = Nothing

UserForm1.ListBox3.Visible = False

Exit Sub

Else

UserForm1.ListBox3.Column = 3

UserForm1.ListBox3.ColumnWidths = «70 pt;100 pt;80 pt»

rs.MoveFirst

Do While Not rs.EOF

    UserForm1.ListBox3.AddItem rs.Fields(0).Value

    UserForm1.ListBox3.List(UserForm1.ListBox3.ListCount – 1, 1) = rs.Fields(1).Value

    UserForm1.ListBox3.List(UserForm1.ListBox3.ListCount – 1, 2) = rs.Fields(2).Value

    rs.MoveNext

Loop

End If

 

End If

Set rs = Nothing

cn.Close

Set cn = Nothing

‘Si solo hay un dato coincidente directamente lo busca y carga sus datos, al seleccionarlo se ejecuta el evento click del listbox

If UserForm1.ListBox3.ListCount – 1 = 0 Then

UserForm1.ListBox3.Selected(0) = True

UserForm1.ListBox3.Visible = False

End If

Application.ScreenUpdating = True

Application.ScreenUpdating = True

End Sub

Private Sub UserForm_Initialize()

Dim fila As Long

Application.DisplayAlerts = False

Application.ScreenUpdating = False

Set b = Sheets(«Hoja1»)

uf = b.Range(«A» & Rows.Count).End(xlUp).Row

uc = b.Cells(1, Columns.Count).End(xlToLeft).Address

wc = Mid(uc, InStr(uc, «$») + 1, InStr(2, uc, «$») – 2)

With Me.ListBox1

    .ColumnCount = 7

    .ColumnWidths = «170 pt;50 pt;50 pt;50 pt;50 pt;50 pt;50 pt»

    .RowSource = «Hoja1!A1:» & wc & uf

End With

Application.DisplayAlerts = True

Application.ScreenUpdating = True

End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)

On Error GoTo Fin

If CloseMode <> 1 Then Cancel = True

Fin:

End Sub

 

Function TableHTML() As String

Dim col As Long, fil As Long

canfil = ActiveSheet.UsedRange.Rows.Count

cancol = ActiveSheet.UsedRange.Columns.Count

stable = «<Div><table>»

For f = 1 To canfil

stable = stable & «<tr>»

    For c = 1 To cancol

        stable = stable & «<td>» & Cells(f, c) & » </td>»

    Next c

    stable = stable & «</tr>»

Next f

stable = stable & «</table> <br><br><br><br><br></Div>»

TableHTML = stable

End Function

 

Código que se inserta en un módulo de VBA

‘**************https://macrosenexcel.com  **** https://youtube.com/programarexcel*********

#If VBA7 And Win64 Then

‘Si es de 64 bits

Public Declare PtrSafe Function ShellExecute Lib «shell32.dll» Alias «ShellExecuteA» (ByVal hwnd As LongPtr, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongPtr

Public Declare PtrSafe Function FindWindow Lib «USER32» Alias «FindWindowA» (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPtr

Public Declare PtrSafe Function GetWindowLongPtr Lib «USER32» Alias «GetWindowLongPtrA» (ByVal hwnd As LongPtr, ByVal nIndex As Long) As LongPtr

Public Declare PtrSafe Function SetWindowLongPtr Lib «USER32» Alias «SetWindowLongPtrA» (ByVal hwnd As LongPtr, ByVal nIndex As Long, ByVal dwNewLong As LongPtr) As LongPtr

Public Declare PtrSafe Function DrawMenuBar Lib «USER32» (ByVal hwnd As Long) As LongPtr

Public Declare PtrSafe Function RegOpenKeyA Lib «advapire32.dll» (ByVal hKey As LongPtr, ByVal lpSubKey As String, phkResult As LongPtr) As LongPtr

#Else

‘Si es de 32 bits

Public 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

Public Declare Function FindWindow Lib «USER32» Alias «FindWindowA» (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Public Declare Function GetWindowLong Lib «USER32» Alias «GetWindowLongA» (ByVal hwnd As Long, ByVal nIndex As Long) As Long

Public Declare Function SetWindowLong Lib «USER32» Alias «SetWindowLongA» (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Public Declare Function DrawMenuBar Lib «USER32» (ByVal hwnd As Long) As Long

Public Declare Function RegOpenKeyA Lib «advapire32.dll» (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long

#End If

Sub muestra1()

UserForm1.Show

End Sub

 
 

Si te fue de utilidad puedes INVITARME UN CAFÉ y de esta manera ayudar a seguir manteniendo la página, CLICK para descargar en ejemplo en forma gratuita.

If this post was helpful INVITE ME A COFFEE and so help keep up the page, CLICK to download free example.

Entradas relacionadas

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Comentarios (144)

I am the owner of JustCBD label (justcbdstore.com) and I’m presently seeking to broaden my wholesale side of business. It would be great if anybody at targetdomain is able to provide some guidance ! I thought that the very best way to do this would be to reach out to vape stores and cbd retailers. I was hoping if anyone could suggest a trusted web-site where I can purchase Vape Shop B2B Data List I am already reviewing creativebeartech.com, theeliquidboutique.co.uk and wowitloveithaveit.com. On the fence which one would be the most ideal choice and would appreciate any support on this. Or would it be simpler for me to scrape my own leads? Ideas?

Responder

I have to thank you for the efforts you have put in penning this blog. I really hope to see the same high-grade content from you in the future as well. In fact, your creative writing abilities has motivated me to get my own, personal site now 😉

Responder

Oh my goodness! Impressive article dude! Thank you, However I am going through issues with your RSS. I don’t understand why I am unable to join it. Is there anybody else having identical RSS issues? Anyone who knows the solution will you kindly respond? Thanks!!

Responder

Your style is so unique compared to other people I have read stuff from. Many thanks for posting when you have the opportunity, Guess I’ll just bookmark this page.

Responder

This site was… how do you say it? Relevant!! Finally I have found something that helped me. Thank you!

Responder

Wonderful article! We are linking to this particularly great article on our website. Keep up the great writing.

Responder

Everything is very open with a really clear description of the issues. It was really informative. Your site is useful. Many thanks for sharing!

Responder

It’s amazing to pay a visit this web site and reading the views of
all colleagues about this paragraph, while I am also zealous of getting know-how.

Responder

I simply want to say I am just new to blogging and site-building and seriously loved you’re web site. Almost certainly I’m likely to bookmark your site . You absolutely come with exceptional writings. Thanks a lot for revealing your blog site.

Responder

I am sure this article has touched all the internet visitors, its really really pleasant piece of writing on building up new weblog.

Responder

I every time spent my half an hour to read this blog’s posts everyday along with a cup of coffee.

Responder

I simply want to say I am just very new to blogging and really savored your web site. Probably I’m want to bookmark your blog . You really have fantastic stories. Thanks for revealing your blog site.

Responder

This is the perfect site for anybody who would like to find out about this topic. You realize so much its almost hard to argue with you (not that I really would want to…HaHa). You definitely put a new spin on a subject which has been discussed for a long time. Great stuff, just excellent!

Responder

I’m very happy to find this page. I need to to thank you for your time due to this wonderful read!! I definitely enjoyed every part of it and i also have you book-marked to check out new things in your site.

Responder

This is a very good tip especially to those fresh to the blogosphere. Brief but very precise information… Appreciate your sharing this one. A must read post!

Responder

Hi, I do think this is a great web site. I stumbledupon it 😉 I am going to come back yet again since I saved as a favorite it. Money and freedom is the greatest way to change, may you be rich and continue to guide others.

Responder

Hi, I do believe this is a great site. I stumbledupon it 😉 I’m going to revisit once again since I book marked it. Money and freedom is the greatest way to change, may you be rich and continue to help others.

Responder

It’s nearly impossible to find well-informed people for this topic, but you seem like you know what you’re talking about! Thanks

Responder

This is the best blog for any individual who intends to find out about this subject. You realize a lot its almost hard to argue with you (not that I actually would want?HaHa). You certainly placed a new spin on a topic thats been covered for years. Great stuff, just wonderful!

Responder

Great information. Lucky me I discovered your website by chance (stumbleupon). I have book marked it for later!

Responder

pitkävetovihjeet

Responder

You ought to take part in a contest for one of the highest quality websites on the web. I am going to highly recommend this site!

Responder

Achieving your fitness goals doesn’t have to require a certified personal trainer or an expensive gym membership, it is not hard to exercise at home. It is easy to go down a training and fitness rabbit hole, however, when you’re looking for the best home exercise equipment to outfit your personal home gym.

Responder

I’m extremely pleased to discover this website. I wanted to thank you for your time for this fantastic read!! I definitely savored every bit of it and I have you book marked to look at new things in your website.

Responder

I couldn’t resist commenting. Perfectly written!

Responder

This page truly has all the info I needed about this subject and didn’t know who to ask.

Responder

This blog was… how do you say it? Relevant!! Finally I’ve found something which helped me. Thanks a lot!

Responder

Shop; Unique Functions. Simple Product Layouts. Post with review. Advanced Product Layout. Best conversion pages. Frontend Search · Listing example …

Responder

Hello, I enjoy reading all of your post. I wanted to write a little comment to
support you. cheap flights 2CSYEon

Responder

❤️Como Filtrar Cliente Fechas Enviar Mail con ? Gmail y PDF Adjunto # 488
avekdmqyqgi
[url=http://www.go6d9jdp6559y79e5trw005jwi754pj9s.org/]uvekdmqyqgi[/url]
vekdmqyqgi http://www.go6d9jdp6559y79e5trw005jwi754pj9s.org/

Responder

Great site you’ve got here.. It’s hard to find high quality writing like yours these days. I honestly appreciate individuals like you! Take care!!

Responder

Excellent article. I am experiencing many of these issues as well..

Responder

I?m satisfied, I must state. Really rarely do I encounter a blog site that?s both informative and enjoyable, as well as let me inform you, you have actually struck the nail on the head. Your idea is exceptional; the problem is something that not enough people are speaking wisely around. I am really delighted that I stumbled across this in my look for something connecting to this.

Responder

Asking questions are actually nice thing
if you are not understanding something completely, however
this paragraph presents fastidious understanding yet.
3aN8IMa cheap flights

Responder

I want to to thank you for this very good read!! I absolutely loved every little bit of it. I have got you book marked to look at new stuff you post…

Responder

Excellent article. I absolutely appreciate this website. Keep it up!

Responder

There is visibly a bundle to learn about this. I presume you made certain nice factors in attributes additionally.

Responder

An outstanding share! I’ve just forwarded this onto a coworker who had been conducting a little research on this. And he in fact bought me dinner because I discovered it for him… lol. So allow me to reword this…. Thanks for the meal!! But yeah, thanx for spending the time to discuss this matter here on your website.

Responder

May I simply say what a comfort to uncover someone who really understands what they’re talking about on the web. You actually realize how to bring a problem to light and make it important. A lot more people need to read this and understand this side of your story. It’s surprising you aren’t more popular because you surely have the gift.

Responder

We tested coffee makers for the water temperature during the brew cycle and the brewing time as well as the temperature of the coffee at the end of brewing and during the keep warm cycle. In addition, we evaluated each brewer’s ease of use, including how easy it was to read and use the controls, access the water tank and brew basket, read the markings on the tank and carafe, whether or not it had automatic keep warm and shut off cycles, and the ease of cleaning the carafe.

Responder

I was really happy to find this web-site. I intended to many thanks for your time for this remarkable read!! I absolutely appreciating every little bit of it and I have you bookmarked to look into brand-new things you post.

Responder

The next time I read a blog, Hopefully it won’t fail me just as much as this one. After all, I know it was my choice to read through, nonetheless I actually believed you would have something interesting to say. All I hear is a bunch of crying about something you could possibly fix if you were not too busy looking for attention.

Responder

Aw, this was an incredibly good post. Taking a few minutes and actual effort to generate a superb article… but what can I say… I hesitate a whole lot and never seem to get anything done.

Responder

I am genuinely thankful to the owner of this web site who has shared this enormous post at at this place.

Responder

After exploring a handful of the blog posts on your site, I truly like your technique of blogging. I saved it to my bookmark webpage list and will be checking back soon. Please visit my web site too and let me know how you feel.

Responder

bookmarked!!, I really like your website!

Responder

There are certainly a variety of details like that to take into consideration. That could be a great point to convey up. I offer the thoughts above as normal inspiration however clearly there are questions just like the one you carry up where a very powerful thing might be working in trustworthy good faith. I don?t know if greatest practices have emerged around things like that, but I am sure that your job is clearly identified as a good game. Each boys and girls feel the impact of only a second’s pleasure, for the remainder of their lives.

Responder

wonderful submit, very informative. I wonder why the opposite specialists of this sector
do not understand this. You should continue your writing.
I’m confident, you’ve a huge readers’ base already!

Responder

Best view i have ever seen !

Responder

Love watching sunset !

Responder

Very nice blog post. I absolutely love this site. Keep it up!

Responder

I’m amazed, I have to admit. Seldom do I come across a blog that’s both educative and interesting, and let me tell you, you’ve hit the nail on the head. The issue is something not enough folks are speaking intelligently about. I’m very happy I came across this during my search for something relating to this.

Responder

Great blog here! Also your web site loads up very fast! What host are you using? Can I get your affiliate link to your host? I wish my web site loaded up as quickly as yours lol

Responder

Love watching sunset !

Responder

I am usually to blog writing and also i truly value your material. The short article has actually peaks my passion. I am mosting likely to bookmark your site as well as keep checking for brand-new information.

Responder

Thanks for your marvelous posting! I seriously enjoyed
reading it, you are a great author.I will make certain to bookmark your blog and may come back very soon. I want to encourage that you continue your great job,
have a nice holiday weekend!

Responder

A motivating discussion is worth comment. I do think that you should publish more on this subject, it may not be a taboo subject but generally folks don’t speak about these subjects. To the next! All the best!!

Responder

You need to take part in a contest for one of the greatest blogs on the net. I’m going to highly recommend this blog!

Responder

Everything is very open with a really clear clarification of the challenges. It was truly informative. Your website is very helpful. Thank you for sharing!

Responder

Hello there! This blog post couldn’t be written much better! Going through this article reminds me of my previous roommate! He continually kept talking about this. I most certainly will forward this information to him. Fairly certain he will have a great read. Many thanks for sharing!

Responder

Love watching sunset !

Responder

I seriously love your website.. Pleasant colors & theme. Did you make this site yourself? Please reply back as I’m attempting to create my own blog and would like to learn where you got this from or what the theme is named. Thanks!

Responder

Best view i have ever seen !

Responder

I’m amazed, I have to admit. Rarely do I encounter a blog that’s both educative and amusing, and let me tell you, you’ve hit the nail on the head. The problem is something which too few men and women are speaking intelligently about. I am very happy I stumbled across this in my hunt for something regarding this.

Responder

Love watching sunset !

Responder

I love it when individuals get together and share opinions. Great blog, continue the good work!

Responder

I’m impressed, I have to admit. Rarely do I come across a blog that’s equally educative and entertaining, and without a doubt, you’ve hit the nail on the head. The problem is something that too few people are speaking intelligently about. Now i’m very happy I stumbled across this in my hunt for something regarding this.

Responder

I do not even know how I ended up here, but I thought this post was great. I do not know who you are but definitely you’re going to a famous blogger if you aren’t already 😉 Cheers!

Responder

Excellent blog post. I certainly appreciate this site. Keep writing!

Responder

Thanks , I have just been looking for information about this subject for ages and yours is the greatest I’ve discovered till now. But, what about the conclusion? Are you sure about the source?

Responder

cbd oil

Responder

Valuable information. Lucky me I found your website by accident, and I am shocked why this accident didn’t happened earlier! I bookmarked it.

Responder

Howdy! This post could not be written any better! Looking through this article reminds me of my previous roommate! He always kept preaching about this. I will forward this information to him. Fairly certain he’s going to have a great read. Thank you for sharing!

Responder

Aw, this was a very good post. Taking a few minutes and actual effort to generate a really good article… but what can I say… I hesitate a lot and don’t seem to get anything done.

Responder

Excellent post. I will be going through a few of these issues as well..

Responder

I couldn’t resist commenting. Exceptionally well written!

Responder

You must participate in a contest for one of the most effective blogs online. I will recommend this website!

Responder

You need to be a part of a contest for one of the highest quality sites on the internet. I’m going to highly recommend this blog!

Responder

I need to to thank you for this excellent read!! I absolutely enjoyed every bit of it. I have you book marked to check out new stuff you post…

Responder

Good info. Lucky me I recently found your blog by chance (stumbleupon). I have saved it for later!

Responder

Having read this I believed it was extremely informative. I appreciate you taking the time and effort to put this article together. I once again find myself personally spending a lot of time both reading and posting comments. But so what, it was still worthwhile!

Responder

After research study a few of the blog posts on your website currently, and I genuinely like your means of blogging. I bookmarked it to my bookmark internet site checklist and also will certainly be examining back soon. Pls take a look at my website also as well as let me recognize what you think.

Responder

Hi there, I believe your website could be having internet browser compatibility problems. Whenever I take a look at your web site in Safari, it looks fine however, when opening in I.E., it has some overlapping issues. I simply wanted to provide you with a quick heads up! Other than that, excellent website!

Responder

I was extremely pleased to find this web-site. I wished to thanks for your time for this fantastic read!! I definitely delighting in every bit of it as well as I have you bookmarked to look into new stuff you post.

Responder

certainly like your web site however you need to check the spelling on quite a few of your posts. Several of them are rife with spelling problems and I find it very bothersome to inform the truth then again I’ll certainly come again again.

Responder

I got what you mean , regards for putting up.Woh I am glad to find this website through google. «Money is the most egalitarian force in society. It confers power on whoever holds it.» by Roger Starr.

Responder

Good article. I am facing some of these issues as well..

Responder

Thanks for giving your ideas. I’d personally also like to convey that video games have been ever evolving. Better technology and revolutions have served create genuine and enjoyable games. These types of entertainment video games were not actually sensible when the actual concept was being experimented with. Just like other styles of electronics, video games too have had to develop by way of many years. This is testimony towards the fast development of video games.

Responder

What i don’t understood is actually how you are now not actually much more smartly-preferred than you might be right now. You’re so intelligent. You know thus considerably in terms of this matter, produced me individually believe it from numerous numerous angles. Its like women and men are not fascinated except it is something to accomplish with Girl gaga! Your personal stuffs great. All the time take care of it up!

Responder

GScraper

Responder

Everyone loves it when individuals come together and share ideas. Great blog, stick with it!

Responder

COTTON vest

Responder

Changling

Responder

This web site is actually a walk-through for all of the details you desired concerning this and also didn?t know who to ask. Peek here, and you?ll certainly discover it.

Responder

Spot on with this write-up, I really believe that this site needs a lot more attention. I’ll probably be returning to read more, thanks for the advice!

Responder

You have observed very interesting points! ps nice internet site.

Responder

We’re a group of volunteers and starting a new scheme in our community. Your site offered us with valuable info to work on. You’ve done a formidable job and our whole community will be grateful to you.

Responder

An impressive share! I have just forwarded this onto a friend who was doing a little homework on this. And he actually bought me lunch because I stumbled upon it for him… lol. So allow me to reword this…. Thanks for the meal!! But yeah, thanks for spending some time to discuss this matter here on your web site.

Responder

I needed to thank you for this great read!! I definitely enjoyed every little bit of it. I’ve got you book marked to look at new things you post…

Responder

I am really enjoying the theme/design of your web site. Do you ever run into any browser compatibility issues? A handful of my blog visitors have complained about my website not operating correctly in Explorer but looks great in Firefox. Do you have any recommendations to help fix this issue?

Responder

You made some really good points there. I checked on the net to find out more about the issue and found most people will go along with your views on this site.

Responder

Kids

Responder

Greetings! Very useful advice within this post! It is the little changes which will make the biggest changes. Thanks for sharing!

Responder

This web site is truly a walk-through for every one of the details you desired concerning this and didn?t understand who to ask. Glance below, and you?ll definitely discover it.

Responder

I blog frequently and I genuinely thank you for your information. This article has really peaked my interest. I am going to book mark your website and keep checking for new details about once per week. I opted in for your Feed too.

Responder

We’re a group of volunteers and starting a new scheme in our community. Your website provided us with valuable info to work on. You’ve done a formidable job and our entire community will be thankful to you.

Responder

Excellent web site. Plenty of helpful info here. I am sending it to several pals ans additionally sharing in delicious. And certainly, thanks for your sweat!

Responder

custom essay online https://customessayjojo.com/ – my custom essay custom writing essay custom written essay п»їcustom essay

Responder

This blog was… how do you say it? Relevant!! Finally I have found something that helped me. Thanks!

Responder

cheap essay writer https://essaywriterdodo.com/ – essay writers toronto the best essay writer fake essay writer magic essay writer

Responder

I wish to express my respect for your kindness for all those that really need help with this important area. Your very own commitment to getting the solution across had become remarkably functional and has continuously allowed people like me to realize their targets. Your important publication entails a whole lot a person like me and extremely more to my colleagues. With thanks; from all of us.

Responder

argumentative essay helper https://essaywriterslop.com/ – college essay writing service reviews admission essay services essay service cheap essay writing service online

Responder

the help by kathryn stockett essay https://essayhelptopp.com/ – help on essay writing help essay 123 essay title help tok essay help

Responder

This is a good tip especially to those new to the blogosphere. Short but very accurate information… Appreciate your sharing this one. A must read post!

Responder

When I initially commented I clicked the -Inform me when brand-new comments are added- checkbox as well as currently each time a comment is included I get four emails with the same comment. Is there any way you can eliminate me from that solution? Many thanks!

Responder

It’s appropriate time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I want to suggest you some interesting things or suggestions. Perhaps you could write next articles referring to this article. I desire to read more things about it!

Responder

You made some good points there. I looked on the web to find out more about the issue and found most people will go along with your views on this web site.

Responder

dissertation writing service https://dissertationaas.com/ – writing dissertation service dissertation statistics best dissertation writing best dissertation service

Responder

phd by thesis only https://termpaperlow.com/ – phd thesis help thesis service editing thesis best thesis editing services

Responder

Hi, I do think this is an excellent blog. I stumbledupon it 😉 I may return once again since i have book marked it. Money and freedom is the greatest way to change, may you be rich and continue to help other people.

Responder

payday loans online https://ausapaydayloans.com/ – usa payday loans same day payday loans same day payday loans payday loans las vegas

Responder

essay writing service legit https://essaywritingservicenews.com/ – legit essay writing services best essay writing service website best online essay writing service what are good essay writing services

Responder

This actually addressed my issue, thank you!

Responder

Hi my family member! I want to say that this post is amazing, great written and come with approximately all significant infos. I’d like to see more posts like this.

Responder

herbal alternative viagra http://60lmentop.com/ – generic viagra 100mg buy discount viagra free viagra free viagra without prescription

Responder

tadalafil generic http://50cialmen.com/ – buy tadalafil online tadalafil liquid cialis no prescription cheap tadalafil

Responder

top essay writing websites https://essayonlinehdb.com/ – cheap custom essay papers how to be a better essay writer write my essay today essay custom writing

Responder

write my math paper https://papersonlinesfy.com/ – pay someone to write a paper for me pay someone to do my paper pay someone to write my paper buy college paper

Responder

What’s Taking place i’m new to this, I stumbled upon this I’ve discovered It positively helpful and it has aided me out loads. I am hoping to contribute & help other users like its helped me. Great job.

Responder

whoah this weblog is magnificent i love reading your posts. Keep up the good paintings! You already know, lots of persons are looking round for this info, you can help them greatly.

Responder

I blog often and I seriously appreciate your content. This article has really peaked my interest. I’m going to bookmark your blog and keep checking for new information about once per week. I subscribed to your RSS feed as well.

Responder

Would you be interested in trading links?

Responder

I don’t even know how I ended up here, but I thought this post was great. I don’t know who you are but certainly you are going to a famous blogger if you aren’t already 😉 Cheers!

Responder

Hello there! Do you use Twitter? I’d like to follow you if that would be okay. I’m undoubtedly enjoying your blog and look forward to new updates.

Responder

natural alternatives to viagra http://45menvia.com/ – buy generic viagra generic viagra sildenafil viagra buy viagra professional

Responder

Unquestionably believe that which you said. Your favorite reason appeared to be on the internet the simplest thing to be aware of. I say to you, I definitely get irked while people consider worries that they plainly don’t know about. You managed to hit the nail upon the top and defined out the whole thing without having side effect , people could take a signal. Will probably be back to get more. Thanks

Responder

I was more than happy to find this page. I want to to thank you for ones time for this fantastic read!! I definitely loved every part of it and I have you bookmarked to look at new information on your web site.

Responder

WONDERFUL Post.thanks for share..extra wait .. …

Responder

You could definitely see your expertise within the work you write. The sector hopes for even more passionate writers such as you who aren’t afraid to mention how they believe. All the time go after your heart. «Faith in the ability of a leader is of slight service unless it be united with faith in his justice.» by George Goethals.

Responder

That is a great tip especially to those new to the blogosphere. Simple but very accurate information… Thank you for sharing this one. A must read article!

Responder