Re: [belajar-excel] Cara cek file open dengan delete file dimqna file itu dibutuhkan

2019-01-31 Terurut Topik 'Mr. Kid' mr.nm...@gmail.com [belajar-excel]
Yup...


On Fri, Feb 1, 2019 at 5:53 AM Tio Adi Bayu Adjie tio.ad...@ptssb.co.id
[belajar-excel]  wrote:

>
>
> Maaf Mr. Kid. Belum paham saya.
>
> Untuk no.2 apakah itu artinya harus buka file dulu sama seperti no. 1 ?
>
>
>
> Terima kasih jawabannya.
>
>
>
> *From:* belajar-excel@yahoogroups.com [mailto:
> belajar-excel@yahoogroups.com]
> *Sent:* 31 Januari 2019 14:29
> *To:* BeExcel
> *Subject:* Re: [belajar-excel] Cara cek file open dengan delete file
> dimqna file itu dibutuhkan
>
>
>
>
>
> Public Sub CekWbkInUse(Optional bState As Boolean = False)
>
> Dim sFile As String
>
> sFile = "D:\lib_links.xlsx"
>
>
>
> 'cara 1 :
>
> Dim wbkF As Workbook
>
> Set wbkF = Workbooks.Open(sFile, 2)
>
> If wbkF.ReadOnly Then
>
> Debug.Print "cara 1 : wbk readonly", "Sedang dipakai user lain"
>
> Else
>
> Debug.Print "cara 1 : wbk readonly", "Tidak ada yang pakai"
>
> End If
>
> wbkF.Close False
>
>
>
> 'cara 2 :
>
> Dim iFile As Integer
>
> Err.Clear
>
> On Error Resume Next
>
> iFile = FreeFile
>
> Open sFile For Binary Access Read Lock Read As iFile: Close iFile
>
> If Err.Number <> 0 Then
>
> Debug.Print "cara 2 : open iofile", "Sedang dipakai user lain"
>
> Else
>
> Debug.Print "cara 2 : open iofile", "Tidak ada yang pakai"
>
> End If
>
> Err.Clear
>
> On Error GoTo 0
>
>
>
> 'cara 3 :
>
> Dim sFBackup As String
>
> Err.Clear
>
> On Error Resume Next
>
> sFBackup = sFile & ".kid"
>
> FileCopy sFile, sFBackup
>
> Kill sFile
>
> If Err.Number <> 0 Then
>
> Debug.Print "cara 3 : save copy delete", "Sedang dipakai user lain"
>
> Else
>
> FileCopy sFBackup, sFile
>
> Debug.Print "cara 3 : save copy delete", "Tidak ada yang pakai"
>
> End If
>
> Kill sFBackup
>
> Err.Clear
>
> On Error GoTo 0
>
> End Sub
>
>
>
> On Wed, Jan 30, 2019 at 7:37 AM Tio Ali tioali2...@yahoo.co..id
>  [belajar-excel] 
> wrote:
>
>
>
> Salqm Bexceller
>
> Saya mau cek file apakah sedang open atau tidak. Kalau file itu tutup,
> saya buka untuk digunakan. Yg saya tahu selama ini adalah dgn coba cek
> apakah file itu readonly atau tidak. Kalau tidak readoonly berarti file
> tutup. Tapi itu akan jadi masalah kalau file itu sudah besar kapasitasnya
> sehingga jadi lama bukanya.
>
> Saya dengar ada cara lain yaitu dengan cara delete file itu. Kalau error
> berarti file itu open
>
> Yg ditanyakan bagaimana teknis delete file itu karena file itu justru file
> yang kita butuhkan ?
>
>
>
> Terima kasih.
>
> Tio
>
>
>
>
>
>
>
> _
> --
>
> *Reply via web post
> <https://groups.yahoo.com/neo/groups/belajar-excel/conversations/messages/45197;_ylc=X3oDMTJybTRwZW9hBF9TAzk3MzU5NzE0BGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRtc2dJZAM0NTE5NwRzZWMDZnRyBHNsawNycGx5BHN0aW1lAzE1NDg3Mjc0ODc-?act=reply=45197>
> *
>
> •
>
> Reply to sender
> 
>
> •
>
> Reply to group
> 
>
> s
> <https://groups.yahoo.com/neo/groups/belajar-excel/conversations/topics/45164;_ylc=X3oDMTM3aTc0Ym5oBF9TAzk3MzU5NzE0BGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRtc2dJZAM0NTE5NwRzZWMDZnRyBHNsawN2dHBjBHN0aW1lAzE1NDg3Mjc0ODcEdHBjSWQDNDUxNjQ->
>
>
> --
>
> Have you tried the highest rated email app? <https://yho.com/1wwmgg>
>
> With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email
> app on the market. What are you waiting for? Now you can access all your
> inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email
> again with 1000GB of free cloud storage.
> --
>
> 
> Pojok Lowongan Kerja yang disediakan milis :
>
> http://milis-belajar-excel.1048464.n5.nabble.com/Pojok-Lowongan-Kerja-f5725753.html
> *** Posting lowongan kerja : ke link tersebut dan klik New Topic
> 
> bergabung ke milis (subscribe), kirim mail kosong ke:
> belajar-excel-subscr...@yahoogroups.com
> posting ke milis, kirimkan ke: belajar-excel@yahoogroups.com
> berkunjung ke web milis :
> http://tech.groups.yahoo.com

RE: [belajar-excel] Cara cek file open dengan delete file dimqna file itu dibutuhkan

2019-01-31 Terurut Topik Tio Adi Bayu Adjie tio.ad...@ptssb.co.id [belajar-excel]
Maaf Mr. Kid. Belum paham saya.
Untuk no.2 apakah itu artinya harus buka file dulu sama seperti no. 1 ?

Terima kasih jawabannya.


From: belajar-excel@yahoogroups.com [mailto:belajar-excel@yahoogroups.com]
Sent: 31 Januari 2019 14:29
To: BeExcel
Subject: Re: [belajar-excel] Cara cek file open dengan delete file dimqna file 
itu dibutuhkan


Public Sub CekWbkInUse(Optional bState As Boolean = False)
Dim sFile As String
sFile = "D:\lib_links.xlsx"

'cara 1 :
Dim wbkF As Workbook
Set wbkF = Workbooks.Open(sFile, 2)
If wbkF.ReadOnly Then
Debug.Print "cara 1 : wbk readonly", "Sedang dipakai user lain"
Else
Debug.Print "cara 1 : wbk readonly", "Tidak ada yang pakai"
End If
wbkF.Close False

'cara 2 :
Dim iFile As Integer
Err.Clear
On Error Resume Next
iFile = FreeFile
Open sFile For Binary Access Read Lock Read As iFile: Close iFile
If Err.Number <> 0 Then
Debug.Print "cara 2 : open iofile", "Sedang dipakai user lain"
Else
Debug.Print "cara 2 : open iofile", "Tidak ada yang pakai"
End If
Err.Clear
On Error GoTo 0

'cara 3 :
Dim sFBackup As String
Err.Clear
On Error Resume Next
sFBackup = sFile & ".kid"
FileCopy sFile, sFBackup
Kill sFile
If Err.Number <> 0 Then
Debug.Print "cara 3 : save copy delete", "Sedang dipakai user lain"
Else
FileCopy sFBackup, sFile
Debug.Print "cara 3 : save copy delete", "Tidak ada yang pakai"
End If
Kill sFBackup
Err.Clear
On Error GoTo 0
End Sub

On Wed, Jan 30, 2019 at 7:37 AM Tio Ali 
tioali2...@yahoo.co..id<mailto:tioali2...@yahoo.co.id> [belajar-excel] 
mailto:belajar-excel@yahoogroups.com>> wrote:

Salqm Bexceller
Saya mau cek file apakah sedang open atau tidak. Kalau file itu tutup, saya 
buka untuk digunakan. Yg saya tahu selama ini adalah dgn coba cek apakah file 
itu readonly atau tidak. Kalau tidak readoonly berarti file tutup. Tapi itu 
akan jadi masalah kalau file itu sudah besar kapasitasnya sehingga jadi lama 
bukanya.
Saya dengar ada cara lain yaitu dengan cara delete file itu. Kalau error 
berarti file itu open
Yg ditanyakan bagaimana teknis delete file itu karena file itu justru file yang 
kita butuhkan ?

Terima kasih.
Tio



_

Reply via web 
post<https://groups.yahoo.com/neo/groups/belajar-excel/conversations/messages/45197;_ylc=X3oDMTJybTRwZW9hBF9TAzk3MzU5NzE0BGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRtc2dJZAM0NTE5NwRzZWMDZnRyBHNsawNycGx5BHN0aW1lAzE1NDg3Mjc0ODc-?act=reply=45197>

•

Reply to sender 
<mailto:hendrikkarn...@yahoo.com?subject=Re%3A%20%5Bbelajar-excel%5D%20Macro%20untuk%20mengambil%20Serial%20Number%20Komputer>

•

Reply to group 
<mailto:belajar-excel@yahoogroups.com?subject=Re%3A%20%5Bbelajar-excel%5D%20Macro%20untuk%20mengambil%20Serial%20Number%20Komputer>

s<https://groups.yahoo.com/neo/groups/belajar-excel/conversations/topics/45164;_ylc=X3oDMTM3aTc0Ym5oBF9TAzk3MzU5NzE0BGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRtc2dJZAM0NTE5NwRzZWMDZnRyBHNsawN2dHBjBHN0aW1lAzE1NDg3Mjc0ODcEdHBjSWQDNDUxNjQ->



Have you tried the highest rated email app?<https://yho.com/1wwmgg>
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on 
the market. What are you waiting for? Now you can access all your inboxes 
(Gmail, Outlook, AOL and more) in one place. Never delete an email again with 
1000GB of free cloud storage.


Pojok Lowongan Kerja yang disediakan milis :
http://milis-belajar-excel.1048464.n5.nabble.com/Pojok-Lowongan-Kerja-f5725753.html
*** Posting lowongan kerja : ke link tersebut dan klik New Topic

bergabung ke milis (subscribe), kirim mail kosong ke: 
belajar-excel-subscr...@yahoogroups.com<mailto:belajar-excel-subscr...@yahoogroups.com>
posting ke milis, kirimkan ke: 
belajar-excel@yahoogroups.com<mailto:belajar-excel@yahoogroups.com>
berkunjung ke web milis : 
http://tech.groups.yahoo.com/group/belajar-excel/messages
melihat file archive / mendownload lampiran : 
http://www.mail-archive.com/belajar-excel@yahoogroups.com/
atau (sejak 25-Apr-2011) bisa juga di : 
http://milis-belajar-excel.1048464.n5.nabble.com/
menghubungi moderators & owners: 
belajar-excel-ow...@yahoogroups.com<mailto:belajar-excel-ow...@yahoogroups.com>
keluar dari membership milis (UnSubscribe), kirim mail kosong ke : 
belajar-excel-unsubscr...@yahoogroups.com<mailto:belajar-excel-unsubscr...@yahoogroups.com>
-
Visit Your 

Re: [belajar-excel] Cara cek file open dengan delete file dimqna file itu dibutuhkan

2019-01-30 Terurut Topik 'Mr. Kid' mr.nm...@gmail.com [belajar-excel]
Public Sub CekWbkInUse(Optional bState As Boolean = False)
Dim sFile As String
sFile = "D:\lib_links.xlsx"

'cara 1 :
Dim wbkF As Workbook
Set wbkF = Workbooks.Open(sFile, 2)
If wbkF.ReadOnly Then
Debug.Print "cara 1 : wbk readonly", "Sedang dipakai user lain"
Else
Debug.Print "cara 1 : wbk readonly", "Tidak ada yang pakai"
End If
wbkF.Close False

'cara 2 :
Dim iFile As Integer
Err.Clear
On Error Resume Next
iFile = FreeFile
Open sFile For Binary Access Read Lock Read As iFile: Close iFile
If Err.Number <> 0 Then
Debug.Print "cara 2 : open iofile", "Sedang dipakai user lain"
Else
Debug.Print "cara 2 : open iofile", "Tidak ada yang pakai"
End If
Err.Clear
On Error GoTo 0

'cara 3 :
Dim sFBackup As String
Err.Clear
On Error Resume Next
sFBackup = sFile & ".kid"
FileCopy sFile, sFBackup
Kill sFile
If Err.Number <> 0 Then
Debug.Print "cara 3 : save copy delete", "Sedang dipakai user lain"
Else
FileCopy sFBackup, sFile
Debug.Print "cara 3 : save copy delete", "Tidak ada yang pakai"
End If
Kill sFBackup
Err.Clear
On Error GoTo 0
End Sub

On Wed, Jan 30, 2019 at 7:37 AM Tio Ali tioali2...@yahoo.co.id
[belajar-excel]  wrote:

>
>
> Salqm Bexceller
> Saya mau cek file apakah sedang open atau tidak. Kalau file itu tutup,
> saya buka untuk digunakan. Yg saya tahu selama ini adalah dgn coba cek
> apakah file itu readonly atau tidak. Kalau tidak readoonly berarti file
> tutup. Tapi itu akan jadi masalah kalau file itu sudah besar kapasitasnya
> sehingga jadi lama bukanya.
> Saya dengar ada cara lain yaitu dengan cara delete file itu. Kalau error
> berarti file itu open
> Yg ditanyakan bagaimana teknis delete file itu karena file itu justru file
> yang kita butuhkan ?
>
> Terima kasih.
> Tio
>
>
>
> _
> --
> Reply via web post
> 
> • Reply to sender
> 
> • Reply to group
> 
>
> s
> 
>
> --
> Have you tried the highest rated email app? 
> With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email
> app on the market. What are you waiting for? Now you can access all your
> inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email
> again with 1000GB of free cloud storage.
> --
> 
> Pojok Lowongan Kerja yang disediakan milis :
>
> http://milis-belajar-excel.1048464.n5.nabble.com/Pojok-Lowongan-Kerja-f5725753.html
> *** Posting lowongan kerja : ke link tersebut dan klik New Topic
> 
> bergabung ke milis (subscribe), kirim mail kosong ke:
> belajar-excel-subscr...@yahoogroups.com
> posting ke milis, kirimkan ke: belajar-excel@yahoogroups.com
> berkunjung ke web milis :
> http://tech.groups.yahoo.com/group/belajar-excel/messages
> melihat file archive / mendownload lampiran :
> http://www.mail-archive.com/belajar-excel@yahoogroups.com/
> atau (sejak 25-Apr-2011) bisa juga di :
> http://milis-belajar-excel.1048464.n5.nabble.com/
> menghubungi moderators & owners: belajar-excel-ow...@yahoogroups.com
> keluar dari membership milis (UnSubscribe), kirim mail kosong ke :
> belajar-excel-unsubscr...@yahoogroups.com
> -
> Visit Your Group
> 
>
>
> [image: Yahoo! Groups]
> 
> • Privacy  •
> Unsubscribe
>  • Terms
> of Use 
>
> SPONSORED LINKS
> .
>
> 
>