Click here to Skip to main content
15,891,431 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: VB 6.0 How do I read from a .txt file? Pin
Zyxil19-Sep-02 10:38
Zyxil19-Sep-02 10:38 
GeneralIN VBS how do I check if some software is installed using registry Pin
SPGV15-Sep-02 23:17
SPGV15-Sep-02 23:17 
GeneralRe: IN VBS how do I check if some software is installed using registry Pin
Ray Cassick16-Sep-02 5:33
Ray Cassick16-Sep-02 5:33 
GeneralDataenviroment Pin
Maryam15-Sep-02 21:49
Maryam15-Sep-02 21:49 
GeneralIn VB (automation) I want to make Powerpoint run in the invisible mode Pin
SPGV15-Sep-02 21:18
SPGV15-Sep-02 21:18 
GeneralIdentifying DesignTime Mode for Forms Pin
Firoz15-Sep-02 19:58
Firoz15-Sep-02 19:58 
QuestionHow to reset an AudioStream in VB? Pin
DengJW15-Sep-02 19:52
DengJW15-Sep-02 19:52 
Generalproblems with removing menu added to Word97 Pin
Mariusz Popiolek15-Sep-02 8:54
sussMariusz Popiolek15-Sep-02 8:54 
Hi
I'm creating new menu and toolbar in AutoExec sub, and removing it in AutoExit. When AutoExit executes I can see that menu and toolbar dissapear, but when I delete .dot from autostart directory and launch Word they are back. But when I manually execute AutoExit then menu and toolbar dissapear forever (strange, isn't it). Here are my subs:

Sub AutoExec()
Dim PKICommandBar As CommandBar
Dim PKIMenu As CommandBarPopup
Dim ETSIMenu As CommandBarPopup
Dim lTest As Long
'menu
Set PKIMenu = Application.CommandBars("Menu Bar").FindControl _
(Type:=msoControlPopup, Tag:=sMenuName)
On Error Resume Next
lTest = PKIMenu.Height
If (lTest = 0) Then Set PKIMenu = Application.CommandBars("Menu Bar"). _
Controls.Add(Type:=msoControlPopup)
PKIMenu.Caption = sMenuName
PKIMenu.Tag = sMenuName
On Error Resume Next
PKIMenu.Controls(sETSIMenuName).Delete
Set ETSIMenu = PKIMenu.Controls.Add(Type:=msoControlPopup)
ETSIMenu.Caption = sETSIMenuName
With ETSIMenu.Controls.Add(msoControlButton)
.OnAction = "SignDocument"
.Caption = "Podpisz dokument"
End With
With ETSIMenu.Controls.Add(msoControlButton)
.OnAction = "Settings"
.Caption = "Ustawienia"
End With
'toolbar
On Error Resume Next
Application.CommandBars(sETSIMenuName).Delete
lTest = 0
Set PKICommandBar = Application.CommandBars.Add
PKICommandBar.Name = sETSIMenuName
With PKICommandBar.Controls.Add(msoControlButton)
.Style = msoButtonIconAndCaption
.FaceId = 22
.TooltipText = "Podpisz dokument"
.OnAction = "SignDocument"
End With
With PKICommandBar.Controls.Add(msoControlButton)
.Style = msoButtonIconAndCaption
.FaceId = 22
.TooltipText = "Ustawienia"
.OnAction = "Settings"
End With
PKICommandBar.Position = msoBarTop
PKICommandBar.Visible = True
End Sub

Sub AutoExit()
On Error Resume Next
Application.CommandBars(sETSIMenuName).Delete
On Error Resume Next
Application.CommandBars("Menu Bar").Controls(sMenuName).Delete
MsgBox ("exit")'that's why I can see that menu and toolbar dissapear when I close Word
End Sub

Thanks for any help
Generalchanging icon in toolbar(from file) Pin
Mariusz Popiolek15-Sep-02 8:48
sussMariusz Popiolek15-Sep-02 8:48 
GeneralReproduce Win Form Pin
AB31383813-Sep-02 9:05
AB31383813-Sep-02 9:05 
GeneralIDE Pin
Nnamdi Onyeyiri13-Sep-02 6:58
Nnamdi Onyeyiri13-Sep-02 6:58 
GeneralRe: IDE Pin
Ray Cassick13-Sep-02 7:22
Ray Cassick13-Sep-02 7:22 
Generalextracting safearray from a variant Pin
Anonymous12-Sep-02 11:14
Anonymous12-Sep-02 11:14 
GeneralRe: extracting safearray from a variant Pin
Vi213-Sep-02 3:48
Vi213-Sep-02 3:48 
GeneralRe: extracting safearray from a variant Pin
Anonymous13-Sep-02 8:32
Anonymous13-Sep-02 8:32 
Generalproblem with passing array parameter to the procedure Pin
Mariusz Popiolek12-Sep-02 10:37
sussMariusz Popiolek12-Sep-02 10:37 
GeneralRe: problem with passing array parameter to the procedure Pin
Nick Parker12-Sep-02 10:55
protectorNick Parker12-Sep-02 10:55 
GeneralRe: problem with passing array parameter to the procedure Pin
Mariusz Popiolek12-Sep-02 11:29
sussMariusz Popiolek12-Sep-02 11:29 
GeneralRe: problem with passing array parameter to the procedure Pin
Nick Parker12-Sep-02 11:36
protectorNick Parker12-Sep-02 11:36 
GeneralByVal Pin
Vi213-Sep-02 3:41
Vi213-Sep-02 3:41 
QuestionAnyone have any experience using Leadtools twain .Net addon? Pin
James Williams12-Sep-02 6:45
James Williams12-Sep-02 6:45 
GeneralRecommendations on a good VB.Net book or two Pin
James Williams11-Sep-02 5:30
James Williams11-Sep-02 5:30 
GeneralRe: Recommendations on a good VB.Net book or two Pin
NormDroid11-Sep-02 6:33
professionalNormDroid11-Sep-02 6:33 
GeneralRe: Recommendations on a good VB.Net book or two Pin
James Williams11-Sep-02 6:37
James Williams11-Sep-02 6:37 
GeneralRe: Recommendations on a good VB.Net book or two Pin
Kevin McFarlane14-Sep-02 0:33
Kevin McFarlane14-Sep-02 0:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.