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.

Guardar como pdf un un userform

publicado

Me podrias ayudar a poder Guardar un UserForm como PDF asignandolo a un boton, yo imprimo el userform con me.printForm pero antes oculto el boton imprimir, luego lo habilito, pero no se como hacerlo en PDF.

Featured Replies

publicado
  • Autor

El maestro @[uSER=143023]Riddle[/uSER] me dijo como:

Private Sub btnPDF_Click()

Dim pdfName As String

' ------------ Alt+PrtScn

keybd_event VK_LMENU, 0, KEYEVENTF_EXTENDEDKEY, 0

keybd_event VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY, 0

keybd_event VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0

keybd_event VK_LMENU, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0

DoEvents 'Otherwise, all of screen would be pasted as if PrtScn rather than Alt+PrtScn was used for the copy.

ThisWorkbook.Worksheets.Add After:=Worksheets(Worksheets.Count)

Range("A1").Select

ActiveSheet.Paste

pdfName = ActiveWorkbook.Path & "\" & "ITEM.pdf"

ActiveSheet.ExportAsFixedFormat _

Type:=xlTypePDF, _

Filename:=pdfName, _

Quality:=xlQualityStandard, _

IncludeDocProperties:=False, _

IgnorePrintAreas:=False, _

OpenAfterPublish:=False

Application.DisplayAlerts = False

Worksheets(Worksheets.Count).Delete

Application.DisplayAlerts = True

end sub

Y esto lo que hace es hacer un print de pantalla y solo guardarme como pdf mi formulario, que es lo que queria, pero lo tengo partido en 2 hojas, lo que quisiera saber es COMO ROTAR LA HOJA ANTES DE GUARDAR EN PDF. me explico, quisiera poder guardarla pero en modo HORIZONTAL y no vertical, como lo hace, hay alguna forma??

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.