Ciao Pedmas,
Ti ringrazio, ma è simile a quanto ho potuto trovare su altri forum...il problema è che non so come integrare il codice della mia userform con i codici di cui parlano...vabbè dai non è un problema di vita o di morte mi terrò la barra del titolo (la x l'ho
disabilitata, è che proprio non vorrei vedere la barra intera)...
Per mostrare la userform senza la barra del titolo, prova qualcosa del genere:
Nel modulo di codice della userform. incolla il seguente codice:
'=========>>
Option Explicit
'--------->>
Private Sub CommandButton1_Click()
MsgBox Prompt:="Goodbye, fare thee well!"
Unload Me
End Sub
'--------->>
Private Sub UserForm_Initialize()
Call RemoveCaption(Me)
Me.CommandButton1.Caption = "Chiudi!"
End Sub
'--------->>
Private Sub UserForm_Activate()
With UserForm1
.Top = 125
.Left = 25
End With
End Sub
'<<=========
In un modulo standard, incolla il seguente codice:
'=========>>
Option Explicit
'--------->>
Private Declare Function FindWindow Lib "User32" _
Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
'--------->>
Private Declare Function GetWindowLong Lib "User32" _
Alias "GetWindowLongA" ( _
ByVal hwnd As Long, _
ByVal nIndex As Long) As Long
'--------->>
Private Declare Function SetWindowLong Lib "User32" _
Alias "SetWindowLongA" _
(ByVal hwnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
'--------->>
Private Declare Function DrawMenuBar Lib "User32" ( _
ByVal hwnd As Long) As Long
'--------->>
Public Sub deleteCaption(objForm As Object)
Dim lStyle As Long
Dim hMenu As Long
Dim mhWndForm As Long
If Val(Application.Version) < 9 Then
mhWndForm = FindWindow("ThunderXFrame", objForm.Caption) 'XL97
Else
mhWndForm = FindWindow("ThunderDFrame", objForm.Caption) 'XL2000+
End If
lStyle = GetWindowLong(mhWndForm, -16)
lStyle = lStyle And Not &HC00000
SetWindowLong mhWndForm, -16, lStyle
DrawMenuBar mhWndForm
End Sub
'--------->>
Public Sub ShowForm()
UserForm1.Show vbModeless
End Sub
'<<=========
Potresti scaricare il mio file di prova Pedmas20150514.xlsm a: **http://1drv.ms/1bSfmAr**
===
Regards,
Norman