Tuesday, June 12, 2012

Merubah Nama (Rename) Active VB Project - VB6 Add-Ins

Berikut merupakan kode untuk merubah nama atau rename Active VB Project: VBInstance.ActiveVBProject.Name = "prjDatabase" apabila Active VB Project ingin dirubah namanya menjadi 'prjDatabase'.
Public VBInstance As VBIDE.VBE 
Public Connect As Connect

Option Explicit

Private Sub
CancelButton_Click()
Connect.Hide
End Sub

Private Sub
OKButton_Click()
RenameActiveProject "prjDatabase"
End Sub

Private Sub
RenameActiveProject(s As String)
VBInstance.ActiveVBProject.Name = s
End Sub