hi,
this is the code i use to write in a closed workbook written by tstom
[VBA]
Sub Write2ClosedBookSingleCellRange(WorkbookFullName As String, SQL As String, NewValue)
Dim conn As New Connection, rs As New Recordset
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & WorkbookFullName & _
";Extended Properties=""Excel 8.0;HDR=NO;"""
rs.Open SQL, conn, 1, 3
rs.Fields(0).Value = NewValue
rs.Update: rs.Close: conn.Close
End Sub
[/VBA]
how can i unprotect if the sheet in the workbook is protected?