saya sudah nemukan cara lain yg sangat cocok dgn kemauan saya, yaitu dgn meng-very hidden kan sheet yg jadi tempat transfer
data dari Access, sehingga saya gak perlu report2 berurusan dgn protected sheet, tinggal jendela VBA excelnya yg saya password
sekali lagi terima kasih mas.
Regards
Hendra
From: sudarsono <jkssbma@yahoo.com>
To: belajar-access@yahoogroups.com
Sent: Wed, March 30, 2011 2:43:21 PM
Subject: [belajar-access] Re: TransferSpreadsheet acExport utk worksheet yg ter-protect
Coba buat di module .
' centang di menu :
' [tools] , [references] ,[microsoft zz.z object library]
' zz.z versi office , misal office 2010 zz.z -> 14.0
sub isiselwsprotect
Dim objexcel As Excel.Application
Dim mWorkBook As Excel.Workbook
Dim msheet As Excel.Worksheet
Set objexcel = Excel.Application
sFullPath = CurrentProject.Path & "\Shorum.xls"
With objexcel
.Visible = False
Set mWorkBook = .Workbooks.Open(sFullPath)
Set msheet = .Sheets("sheet1")
msheet.Unprotect ("coba")
msheet.Cells(8, 1).Select
ActiveCell.Value = "isi"
msheet.Protect ("coba")
mWorkBook.Close savechanges:=True
.Quit
End With
semoga berguna
'=========
--- In belajar-access@yahoogroups.com, "hasimnurhsm@..." <hasimnurhsm@...> wrote:
>
> hallo mas. hendra..codenya di buat di access, maaf kl saya salah menafsirkan kl berkenan kirim saja file access dan file excel yg terprotectnya.., soalnya saya masih meraba2 maksud mas. mungkin menambah data dari access ke excel pada cell tertentu saja. pada sheet yg terprotect.
>
> salam
>
> Nurhasim Hasan
>
> --- On Fri, 25/3/11, Hendra Agestha Hamid <the_agestha@...> wrote:
>
> From: Hendra Agestha Hamid <the_agestha@...>
> Subject: Re: [belajar-access] TransferSpreadsheet acExport utk worksheet yg ter-protect
> To: belajar-access@yahoogroups.com
> Received: Friday, 25 March, 2011, 4:28 AM
>
>
>
>
>
>
>
> Â
>
>
>
>
>
>
>
>
>
> Tengkyu mas...
> Maksud saya excelnya sdh terprotect, gimana caranya proses export ke excel tsb tetap bisa .... btw coding yg mas kasih itu ditulis di Vba accessnya atau
> di vba excelnya mas...?
> Regards
> Hendra
>
>
> From: "hasimnurhsm@..." <hasimnurhsm@...>
> To: belajar-access@yahoogroups.com
> Sent: Fri, March 25, 2011 4:00:17 PM
> Subject: Re: [belajar-access] TransferSpreadsheet acExport utk worksheet yg ter-protect
>
>
>
>
>
>
>
>
>
> Â
>
>
>
>
>
>
> waduh mas. hendra mungkin cara saya agak ribet nich...tp siapa tahu para suhu ada yang lebih simple..caranya sbb:
>
> pertama pake rumus export biasa spt ini:
>
> DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Bkup_Ctrl", "G:\Stuff.xls", True
> Â
> kedua secara program kita buka lagi file excelnya, baru kita kasih protect/password sheetnya spt ini:
>
> Dim oxl As Object
> Dim oexcel As Object
> Dim sfullpath As String
> Dim spath As String
>
> Set
> oxl =
> CreateObject("excel.application")
> sfullpath = "G:\Stuff.xls"
> Â Â Â With oxl
> Â Â Â Â Â Â Â .Visible = False
> Â Â Â Â Â Â Â .Workbooks.Open (sfullpath)
> Â Â Â Â Â Â Â For I = 1 To .Sheets.Count
> Â Â Â Â Â Â Â Â Â Â Â nmsheet = .Sheets(I).Name
> Â Â Â Â Â Â Â Â Â Â Â .Sheets(nmsheet).Protect
> ("cobaaja")
> Â Â Â Â Â Â Â Next I
> Â Â Â End With
> Â Â Â
> Â Â Â oxl.Save
> Â Â Â oxl.Quit
>
> silahkan disesuaikan dengan kebutuhan mas. h
> endra
>
> salam
>
> Nurhasim Hasan
>
>
>
> --- On Mon, 21/3/11, Hendra Agestha Hamid <the_agestha@...> wrote:
>
> From: Hendra Agestha Hamid <the_agestha@...>
> Subject: [belajar-access] TransferSpreadsheet acExport utk worksheet yg
> ter-protect
> To: belajar-access@yahoogroups.com
> Received: Monday, 21 March, 2011, 8:58 PM
>
>
>
>
>
>
>
> Â
>
>
>
>
>
>
> Dear warga milis,...
>
> Bagaimana caranya kita melakukan TransferSpreadsheet acExport tapi worksheet di excel tsb kita set terprotect dgn sebuah password..?
>
> Terima kasih
> Regards
> Hendra
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Â
>
__._,_.___
No comments:
Post a Comment