Tengo un archivo que al habilitar contenido me aparece el error Error de compilación:
El código de este proyecto se debe actualizar para usarse en sistemas de 64 bits. Revise y actualice las instrucciones Declare y, a continuación, márquelas con el atributo PtrSafe. y me abre Visual Basic para aplicaciones. el código es Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Declare Function GetWindowRect Lib "user32" _
(ByVal hwnd As Long, _
lpRect As RECT) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Function ScreenResolution() As String
Dim rec As RECT
Dim sWidth As String
Dim sHigh As String
Call GetWindowRect(GetDesktopWindow, rec)
sWidth = CStr(rec.Right - rec.Left)
sHigh = CStr(rec.Bottom - rec.Top)
'ScreenResolution = sWidth & " x " & sHigh
ScreenResolution = sHigh
End Function
Sub limpiatabla()
'
' limpiatabla Macro
'
'
Rows("2:2").Select
Selection.ClearContents
End Sub
Featured Replies
Archivado
Este tema está ahora archivado y está cerrado a más respuestas.
Tengo un archivo que al habilitar contenido me aparece el error Error de compilación:
El código de este proyecto se debe actualizar para usarse en sistemas de 64 bits. Revise y actualice las instrucciones Declare y, a continuación, márquelas con el atributo PtrSafe. y me abre Visual Basic para aplicaciones. el código es Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Declare Function GetWindowRect Lib "user32" _
(ByVal hwnd As Long, _
lpRect As RECT) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Function ScreenResolution() As String
Dim rec As RECT
Dim sWidth As String
Dim sHigh As String
Call GetWindowRect(GetDesktopWindow, rec)
sWidth = CStr(rec.Right - rec.Left)
sHigh = CStr(rec.Bottom - rec.Top)
'ScreenResolution = sWidth & " x " & sHigh
ScreenResolution = sHigh
End Function
Sub limpiatabla()
'
' limpiatabla Macro
'
'
Rows("2:2").Select
Selection.ClearContents
End Sub