Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Codigo en Modulo para 4 formularios

publicado

este código lo tengo en formulario pero quiero tenerlo en un Modulo para no estar repitiendo código en 4 formularios pero;

'>------------------------------------------------------<    
Dim lStyle As Long, hMenu As Long, mhWndForm As Long

mhWndForm = FindWindow("ThunderDFrame", [COLOR="#FF0000"][B]Me[/B][/COLOR].Caption)
lStyle = GetWindowLong(mhWndForm, -16)
lStyle = lStyle And Not &HC00000
SetWindowLong mhWndForm, -16, lStyle
DrawMenuBar mhWndForm
[COLOR="#FF0000"][B]Me[/B][/COLOR].Height = [COLOR="#FF0000"][B]Me[/B][/COLOR].Height - 18
'>------------------------------------------------------<[/CODE]

En el modulo coloque así

[CODE]Sub SinBarra(Formulario As UserForm)

Dim lStyle As Long, hMenu As Long, mhWndForm As Long
mhWndForm = FindWindow("ThunderDFrame", msforms.[COLOR="#FF0000"][B]Caption[/B][/COLOR])
lStyle = GetWindowLong(mhWndForm, -16)
lStyle = lStyle And Not &HC00000
SetWindowLong mhWndForm, -16, lStyle
DrawMenuBar mhWndForm
msforms.Height = msforms.Height - 18[/CODE]

y lo llamo desde cualquier formulario

Private Sub UserForm_Initialize() 'CARGA DEL FORMULARIO

SinBarra Me

Me manda error en lo rojo que dice; Error de copilacion. No se encontro el método o el dato miembro

Alguna solución para que desde un modulo cualquier de los 4 formularios tomen la llamada para si?

Featured Replies

publicado

Hola Joaom:

Porque no pruebas realmente a llamarlo con la instrucción "CALL" de la siguiente manera:

Private Sub UserForm_Initialize() 'CARGA DEL FORMULARIO

Call SinBarra

pruebalo y ya nos diras si te funciona.

Andrés

publicado

Hola a todos:

En un módulo normal:


Sub SinBarra([COLOR=#ff0000][B]Formulario As Object[/B][/COLOR])
Dim lStyle As Long, hMenu As Long, mhWndForm As Long
mhWndForm = FindWindow("ThunderDFrame", [COLOR=#ff0000][B]Formulario[/B][/COLOR].Caption)
lStyle = GetWindowLong(mhWndForm, -16)
lStyle = lStyle And Not &HC00000
SetWindowLong mhWndForm, -16, lStyle
DrawMenuBar mhWndForm
[COLOR=#ff0000][B]Formulario[/B][/COLOR].Height = [COLOR=#ff0000][B]Formulario[/B][/COLOR].Height - 18
End Sub
[/CODE]

y en cada formulario, en el evento [i][b]Initialize [/b][/i]o [i][b]Activate[/b][/i]:

[CODE]SinBarra Me[/CODE]

Saludos

publicado
  • Autor

Hola Macro

Editado

Gracias pepafg

Agradecido Macro Antonio, Muy bien, resuelto

Tema Solucionado

Archivado

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.