Opprette en bruker i Microsoft Excel 2003 legger automatisk den blå Bruker Form tittellinjen øverst i skjemaet vinduet. Du kan tilpasse utseendet på din Excel-bruker skjema ved å fjerne tittellinjen fra skjemaet vinduet. Å slette " Bruker Form" tittellinjen , bruker Microsoft Visual Basic Editor til å endre brukerskjema modulen kode . Instruksjoner
en
Launch Microsoft Excel 2003 . Trykk på " Alt" og " F11 " tastene på tastaturet samtidig for å starte Microsoft Visual Basic-redigering søknad inne Excel.
2
Klikk "Sett inn" i hoved navigasjonsmenyen. Velg " UserForm " fra drop -down menyen .
3
Dobbeltklikk på " UserForm1 "-vinduet for å åpne koden vinduet. Markere og slette koden i vinduet
4
Lim inn følgende kode inn i vinduet : .
Option Explicit
Private Sub UserForm_Initialize ( )
< p > Ring RemoveCaption (Me )
End Sub
5
Klikk "Sett inn" i hoved navigasjonsmenyen. . Velg " Module" fra drop -down menyen
6
Lim inn følgende kode i modulen vinduet : en
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 Som Long , _ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib " User32 " _Alias " SetWindowLongA " ( ByVal hwnd Som Long , _ByVal nIndex Som Long , _ByVal dwNewLong As Long) As Long
Private Declare funksjon DrawMenuBar Lib " User32 " ( _ByVal hwnd As Long) As Long
Sub RemoveCaption ( objForm som objekt )
Dim lStyle Som LongDim hMenu Som LongDim mhWndForm Som Long
Hvis Val ( Application.Version ) < 9 ThenmhWndForm = FindWindow ( " ThunderXFrame " , objForm.Caption ) ' XL97ElsemhWndForm = FindWindow ( " ThunderDFrame " , objForm.Caption ) ' XL2000 + End IflStyle = GetWindowLong ( mhWndForm , -16 ) lStyle = lStyle og Ikke & HC00000SetWindowLong mhWndForm , -16 , lStyleDrawMenuBar mhWndForm
End Sub
Sub ShowForm ( )
UserForm1.Show False
End sub
7
Klikk på " x "-knappen i øvre høyre hjørne av Visual Basic Editor vinduet for å lukke programmet og alle vinduer . Du trenger ikke å lagre innholdet i koden bokser .
8
Klikk "Verktøy" i hovedmenyen . Velg " makro" etterfulgt av " Makroer . " Velg " ShowForm ." Klikk på " Kjør"-knappen . Excel bruker skjemaet viser nå uten tittellinjen.