Tuesday, November 30, 2010

[VB.6] lock & unlock excel sheet

hueheueheue

nih codingnya untuk unlock ( yg di bold itu codingnya )

Dim xlApp As Object
Dim xlWb As Object
Dim xlWs As Object
Dim fldCount As Integer
Dim iCol As Integer

Set xlApp = CreateObject("excel.application")
Set xlWs = xlApp.activesheet
xlApp.Visible = True
xlApp.UserControl = True
Call xlWs.unProtect(Password:="xxx")

ini coding buat lock lagi :

Call xlWs.Protect(Password:="xxx")

No comments:

Post a Comment