[belajar-excel] Macro untuk mengambil Serial Number Komputer [1 Attachment]

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[belajar-excel] Macro untuk mengambil Serial Number Komputer [1 Attachment]

hendrik karnadi
Dear Be-Excel,
Selamat pagi, salam sejahtera.
Pada kesempatan ini saya ingin bertanya :Bagaimanakah perintah Macro di Excel (jika bisa) untuk mengambil Serial Number dari komputer yang sedang kita gunakan ?Saya akan menggunakan Serial Number ini untuk mem-password file Excel.
Di bawah ini adalah Serial Number yang saya dapatkan melalui perintah Cmd:\, WMIC BASEBOARD GET PRODUCT, .....


Terima kasih.

Salam,HK



1548304295036blob.jpg (59K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [belajar-excel] Macro untuk mengambil Serial Number Komputer

Agus-2
Dear Pak Hendrik
Selamat malam,
saya menggunakan cekript di bawah pada Visual Basic 6.0.
dicoba dahulu pak Hendrik semoga berfungsi dikomputer pak Hendrik.
saya pakai juga di Excel 2007 berfungsi normal.

Option Explicit
Sub SerialNumber()
Dim objs As Object
Dim obj As Object
Dim WMI As Object
Dim procid As String
Set WMI = GetObject("WinMgmts:")
Set objs = WMI.InstancesOf("Win32_BaseBoard")
For Each obj In objs
procid = procid & obj.SerialNumber
If procid < objs.Count Then procid = procid & ","
Next
*MsgBox procid*
End Sub

Salam
KenangAgus

On 1/24/2019 11:38, hendrik karnadi [hidden email]
[belajar-excel] wrote:

> Dear Be-Excel,
>
> Selamat pagi, salam sejahtera.
>
> Pada kesempatan ini saya ingin bertanya :
> Bagaimanakah perintah Macro di Excel (/*jika bisa*/) untuk mengambil
> Serial Number dari komputer yang sedang kita gunakan ?
> Saya akan menggunakan Serial Number ini untuk mem-password file Excel.
>
> Di bawah ini adalah Serial Number yang saya dapatkan melalui perintah
> Cmd:\, WMIC BASEBOARD GET PRODUCT, .....
>
> Inline image
>
> Terima kasih.
>
> Salam,
> HK
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [belajar-excel] Macro untuk mengambil Serial Number Komputer [1 Attachment]

YaYa
In reply to this post by hendrik karnadi
 Dear Pak Hendrik:Selamat malam, saya menggunakan cekript di bawah pada Visual Basic 6.0. dicoba dahulu pak Hendrik semoga berfungsi dikomputer pak Hendrik. saya pakai juga di Excel 2007 berfungsi normal.
  Option Explicit
 Sub SerialNumber()
 Dim objs As Object
 Dim obj As Object
 Dim WMI As Object
 Dim procid As String
 Set WMI = GetObject("WinMgmts:")
 Set objs = WMI.InstancesOf("Win32_BaseBoard")
 For Each obj In objs
 procid = procid & obj.SerialNumber
 If procid < objs.Count Then procid = procid & ","
 Next
 MsgBox procid
 End Sub

  Salam KenangAgus

    On Thursday, January 24, 2019, 11:39:10 AM GMT+7, hendrik karnadi [hidden email] [belajar-excel] <[hidden email]> wrote:

  

Dear Be-Excel,
Selamat pagi, salam sejahtera.
Pada kesempatan ini saya ingin bertanya :Bagaimanakah perintah Macro di Excel (jika bisa) untuk mengambil Serial Number dari komputer yang sedang kita gunakan ?Saya akan menggunakan Serial Number ini untuk mem-password file Excel.
Di bawah ini adalah Serial Number yang saya dapatkan melalui perintah Cmd:\, WMIC BASEBOARD GET PRODUCT, .......


Terima kasih.

Salam,HK


  #yiv4004352480 #yiv4004352480 -- #yiv4004352480ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv4004352480 #yiv4004352480ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv4004352480 #yiv4004352480ygrp-mkp #yiv4004352480hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv4004352480 #yiv4004352480ygrp-mkp #yiv4004352480ads {margin-bottom:10px;}#yiv4004352480 #yiv4004352480ygrp-mkp .yiv4004352480ad {padding:0 0;}#yiv4004352480 #yiv4004352480ygrp-mkp .yiv4004352480ad p {margin:0;}#yiv4004352480 #yiv4004352480ygrp-mkp .yiv4004352480ad a {color:#0000ff;text-decoration:none;}#yiv4004352480 #yiv4004352480ygrp-sponsor #yiv4004352480ygrp-lc {font-family:Arial;}#yiv4004352480 #yiv4004352480ygrp-sponsor #yiv4004352480ygrp-lc #yiv4004352480hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv4004352480 #yiv4004352480ygrp-sponsor #yiv4004352480ygrp-lc .yiv4004352480ad {margin-bottom:10px;padding:0 0;}#yiv4004352480 #yiv4004352480actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv4004352480 #yiv4004352480activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv4004352480 #yiv4004352480activity span {font-weight:700;}#yiv4004352480 #yiv4004352480activity span:first-child {text-transform:uppercase;}#yiv4004352480 #yiv4004352480activity span a {color:#5085b6;text-decoration:none;}#yiv4004352480 #yiv4004352480activity span span {color:#ff7900;}#yiv4004352480 #yiv4004352480activity span .yiv4004352480underline {text-decoration:underline;}#yiv4004352480 .yiv4004352480attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv4004352480 .yiv4004352480attach div a {text-decoration:none;}#yiv4004352480 .yiv4004352480attach img {border:none;padding-right:5px;}#yiv4004352480 .yiv4004352480attach label {display:block;margin-bottom:5px;}#yiv4004352480 .yiv4004352480attach label a {text-decoration:none;}#yiv4004352480 blockquote {margin:0 0 0 4px;}#yiv4004352480 .yiv4004352480bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv4004352480 .yiv4004352480bold a {text-decoration:none;}#yiv4004352480 dd.yiv4004352480last p a {font-family:Verdana;font-weight:700;}#yiv4004352480 dd.yiv4004352480last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv4004352480 dd.yiv4004352480last p span.yiv4004352480yshortcuts {margin-right:0;}#yiv4004352480 div.yiv4004352480attach-table div div a {text-decoration:none;}#yiv4004352480 div.yiv4004352480attach-table {width:400px;}#yiv4004352480 div.yiv4004352480file-title a, #yiv4004352480 div.yiv4004352480file-title a:active, #yiv4004352480 div.yiv4004352480file-title a:hover, #yiv4004352480 div.yiv4004352480file-title a:visited {text-decoration:none;}#yiv4004352480 div.yiv4004352480photo-title a, #yiv4004352480 div.yiv4004352480photo-title a:active, #yiv4004352480 div.yiv4004352480photo-title a:hover, #yiv4004352480 div.yiv4004352480photo-title a:visited {text-decoration:none;}#yiv4004352480 div#yiv4004352480ygrp-mlmsg #yiv4004352480ygrp-msg p a span.yiv4004352480yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv4004352480 .yiv4004352480green {color:#628c2a;}#yiv4004352480 .yiv4004352480MsoNormal {margin:0 0 0 0;}#yiv4004352480 o {font-size:0;}#yiv4004352480 #yiv4004352480photos div {float:left;width:72px;}#yiv4004352480 #yiv4004352480photos div div {border:1px solid #666666;min-height:62px;overflow:hidden;width:62px;}#yiv4004352480 #yiv4004352480photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv4004352480 #yiv4004352480reco-category {font-size:77%;}#yiv4004352480 #yiv4004352480reco-desc {font-size:77%;}#yiv4004352480 .yiv4004352480replbq {margin:4px;}#yiv4004352480 #yiv4004352480ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv4004352480 #yiv4004352480ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv4004352480 #yiv4004352480ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv4004352480 #yiv4004352480ygrp-mlmsg select, #yiv4004352480 input, #yiv4004352480 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv4004352480 #yiv4004352480ygrp-mlmsg pre, #yiv4004352480 code {font:115% monospace;}#yiv4004352480 #yiv4004352480ygrp-mlmsg * {line-height:1.22em;}#yiv4004352480 #yiv4004352480ygrp-mlmsg #yiv4004352480logo {padding-bottom:10px;}#yiv4004352480 #yiv4004352480ygrp-msg p a {font-family:Verdana;}#yiv4004352480 #yiv4004352480ygrp-msg p#yiv4004352480attach-count span {color:#1E66AE;font-weight:700;}#yiv4004352480 #yiv4004352480ygrp-reco #yiv4004352480reco-head {color:#ff7900;font-weight:700;}#yiv4004352480 #yiv4004352480ygrp-reco {margin-bottom:20px;padding:0px;}#yiv4004352480 #yiv4004352480ygrp-sponsor #yiv4004352480ov li a {font-size:130%;text-decoration:none;}#yiv4004352480 #yiv4004352480ygrp-sponsor #yiv4004352480ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv4004352480 #yiv4004352480ygrp-sponsor #yiv4004352480ov ul {margin:0;padding:0 0 0 8px;}#yiv4004352480 #yiv4004352480ygrp-text {font-family:Georgia;}#yiv4004352480 #yiv4004352480ygrp-text p {margin:0 0 1em 0;}#yiv4004352480 #yiv4004352480ygrp-text tt {font-size:120%;}#yiv4004352480 #yiv4004352480ygrp-vital ul li:last-child {border-right:none !important;}#yiv4004352480

1548304295036blob.jpg (59K) Download Attachment
Kid
Reply | Threaded
Open this post in threaded view
|

Re: [belajar-excel] Macro untuk mengambil Serial Number Komputer

Kid
Administrator
In reply to this post by hendrik karnadi
begini :
Debug.Print
GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2").ExecQuery("Select
* from Win32_BaseBoard").itemindex(0).serialnumber

bisa ditulis di immediate window, bisa dimasukkan ke sebuah prosedur, dan
sebagainya.





On Thu, Jan 24, 2019 at 11:38 AM hendrik karnadi [hidden email]
[belajar-excel] <[hidden email]> wrote:

>
>
> Dear Be-Excel,
>
> Selamat pagi, salam sejahtera.
>
> Pada kesempatan ini saya ingin bertanya :
> Bagaimanakah perintah Macro di Excel (*jika bisa*) untuk mengambil Serial
> Number dari komputer yang sedang kita gunakan ?
> Saya akan menggunakan Serial Number ini untuk mem-password file Excel.
>
> Di bawah ini adalah Serial Number yang saya dapatkan melalui perintah
> Cmd:\, WMIC BASEBOARD GET PRODUCT, .....
>
> [image: Inline image]
>
> Terima kasih.
>
> Salam,
> HK
>
>
>
>
>

1548304295036blob.jpg (59K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [belajar-excel] Macro untuk mengambil Serial Number Komputer [1 Attachment]

hendrik karnadi
Makasih Mr.Kid.Akan saya coba.
Salam,HK

Sent from Yahoo Mail on Android
 
  On Tue, Jan 29, 2019 at 8:31, 'Mr. Kid' [hidden email] [belajar-excel]<[hidden email]> wrote:      

begini :Debug.Print GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2").ExecQuery("Select * from Win32_BaseBoard").itemindex(0).serialnumber

bisa ditulis di immediate window, bisa dimasukkan ke sebuah prosedur, dan sebagainya.




On Thu, Jan 24, 2019 at 11:38 AM hendrik karnadi [hidden email] [belajar-excel] <[hidden email]> wrote:

    

Dear Be-Excel,
Selamat pagi, salam sejahtera.
Pada kesempatan ini saya ingin bertanya :Bagaimanakah perintah Macro di Excel (jika bisa) untuk mengambil Serial Number dari komputer yang sedang kita gunakan ?Saya akan menggunakan Serial Number ini untuk mem-password file Excel.
Di bawah ini adalah Serial Number yang saya dapatkan melalui perintah Cmd:\, WMIC BASEBOARD GET PRODUCT, .....


Terima kasih.

Salam,HK




   
  #yiv0969713651 #yiv0969713651 -- #yiv0969713651ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv0969713651 #yiv0969713651ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv0969713651 #yiv0969713651ygrp-mkp #yiv0969713651hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv0969713651 #yiv0969713651ygrp-mkp #yiv0969713651ads {margin-bottom:10px;}#yiv0969713651 #yiv0969713651ygrp-mkp .yiv0969713651ad {padding:0 0;}#yiv0969713651 #yiv0969713651ygrp-mkp .yiv0969713651ad p {margin:0;}#yiv0969713651 #yiv0969713651ygrp-mkp .yiv0969713651ad a {color:#0000ff;text-decoration:none;}#yiv0969713651 #yiv0969713651ygrp-sponsor #yiv0969713651ygrp-lc {font-family:Arial;}#yiv0969713651 #yiv0969713651ygrp-sponsor #yiv0969713651ygrp-lc #yiv0969713651hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv0969713651 #yiv0969713651ygrp-sponsor #yiv0969713651ygrp-lc .yiv0969713651ad {margin-bottom:10px;padding:0 0;}#yiv0969713651 #yiv0969713651actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv0969713651 #yiv0969713651activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv0969713651 #yiv0969713651activity span {font-weight:700;}#yiv0969713651 #yiv0969713651activity span:first-child {text-transform:uppercase;}#yiv0969713651 #yiv0969713651activity span a {color:#5085b6;text-decoration:none;}#yiv0969713651 #yiv0969713651activity span span {color:#ff7900;}#yiv0969713651 #yiv0969713651activity span .yiv0969713651underline {text-decoration:underline;}#yiv0969713651 .yiv0969713651attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv0969713651 .yiv0969713651attach div a {text-decoration:none;}#yiv0969713651 .yiv0969713651attach img {border:none;padding-right:5px;}#yiv0969713651 .yiv0969713651attach label {display:block;margin-bottom:5px;}#yiv0969713651 .yiv0969713651attach label a {text-decoration:none;}#yiv0969713651 blockquote {margin:0 0 0 4px;}#yiv0969713651 .yiv0969713651bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv0969713651 .yiv0969713651bold a {text-decoration:none;}#yiv0969713651 dd.yiv0969713651last p a {font-family:Verdana;font-weight:700;}#yiv0969713651 dd.yiv0969713651last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv0969713651 dd.yiv0969713651last p span.yiv0969713651yshortcuts {margin-right:0;}#yiv0969713651 div.yiv0969713651attach-table div div a {text-decoration:none;}#yiv0969713651 div.yiv0969713651attach-table {width:400px;}#yiv0969713651 div.yiv0969713651file-title a, #yiv0969713651 div.yiv0969713651file-title a:active, #yiv0969713651 div.yiv0969713651file-title a:hover, #yiv0969713651 div.yiv0969713651file-title a:visited {text-decoration:none;}#yiv0969713651 div.yiv0969713651photo-title a, #yiv0969713651 div.yiv0969713651photo-title a:active, #yiv0969713651 div.yiv0969713651photo-title a:hover, #yiv0969713651 div.yiv0969713651photo-title a:visited {text-decoration:none;}#yiv0969713651 div#yiv0969713651ygrp-mlmsg #yiv0969713651ygrp-msg p a span.yiv0969713651yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv0969713651 .yiv0969713651green {color:#628c2a;}#yiv0969713651 .yiv0969713651MsoNormal {margin:0 0 0 0;}#yiv0969713651 o {font-size:0;}#yiv0969713651 #yiv0969713651photos div {float:left;width:72px;}#yiv0969713651 #yiv0969713651photos div div {border:1px solid #666666;min-height:62px;overflow:hidden;width:62px;}#yiv0969713651 #yiv0969713651photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv0969713651 #yiv0969713651reco-category {font-size:77%;}#yiv0969713651 #yiv0969713651reco-desc {font-size:77%;}#yiv0969713651 .yiv0969713651replbq {margin:4px;}#yiv0969713651 #yiv0969713651ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv0969713651 #yiv0969713651ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv0969713651 #yiv0969713651ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv0969713651 #yiv0969713651ygrp-mlmsg select, #yiv0969713651 input, #yiv0969713651 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv0969713651 #yiv0969713651ygrp-mlmsg pre, #yiv0969713651 code {font:115% monospace;}#yiv0969713651 #yiv0969713651ygrp-mlmsg * {line-height:1.22em;}#yiv0969713651 #yiv0969713651ygrp-mlmsg #yiv0969713651logo {padding-bottom:10px;}#yiv0969713651 #yiv0969713651ygrp-msg p a {font-family:Verdana;}#yiv0969713651 #yiv0969713651ygrp-msg p#yiv0969713651attach-count span {color:#1E66AE;font-weight:700;}#yiv0969713651 #yiv0969713651ygrp-reco #yiv0969713651reco-head {color:#ff7900;font-weight:700;}#yiv0969713651 #yiv0969713651ygrp-reco {margin-bottom:20px;padding:0px;}#yiv0969713651 #yiv0969713651ygrp-sponsor #yiv0969713651ov li a {font-size:130%;text-decoration:none;}#yiv0969713651 #yiv0969713651ygrp-sponsor #yiv0969713651ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv0969713651 #yiv0969713651ygrp-sponsor #yiv0969713651ov ul {margin:0;padding:0 0 0 8px;}#yiv0969713651 #yiv0969713651ygrp-text {font-family:Georgia;}#yiv0969713651 #yiv0969713651ygrp-text p {margin:0 0 1em 0;}#yiv0969713651 #yiv0969713651ygrp-text tt {font-size:120%;}#yiv0969713651 #yiv0969713651ygrp-vital ul li:last-child {border-right:none !important;}#yiv0969713651  
 
 
  On Tue, Jan 29, 2019 at 8:31, 'Mr. Kid' [hidden email] [belajar-excel]<[hidden email]> wrote:      

begini :Debug.Print GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2").ExecQuery("Select * from Win32_BaseBoard").itemindex(0).serialnumber

bisa ditulis di immediate window, bisa dimasukkan ke sebuah prosedur, dan sebagainya.




On Thu, Jan 24, 2019 at 11:38 AM hendrik karnadi [hidden email] [belajar-excel] <[hidden email]> wrote:

    

Dear Be-Excel,
Selamat pagi, salam sejahtera.
Pada kesempatan ini saya ingin bertanya :Bagaimanakah perintah Macro di Excel (jika bisa) untuk mengambil Serial Number dari komputer yang sedang kita gunakan ?Saya akan menggunakan Serial Number ini untuk mem-password file Excel.
Di bawah ini adalah Serial Number yang saya dapatkan melalui perintah Cmd:\, WMIC BASEBOARD GET PRODUCT, .....


Terima kasih.

Salam,HK




   
  #yiv0969713651 #yiv0969713651 -- #yiv0969713651ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv0969713651 #yiv0969713651ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv0969713651 #yiv0969713651ygrp-mkp #yiv0969713651hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv0969713651 #yiv0969713651ygrp-mkp #yiv0969713651ads {margin-bottom:10px;}#yiv0969713651 #yiv0969713651ygrp-mkp .yiv0969713651ad {padding:0 0;}#yiv0969713651 #yiv0969713651ygrp-mkp .yiv0969713651ad p {margin:0;}#yiv0969713651 #yiv0969713651ygrp-mkp .yiv0969713651ad a {color:#0000ff;text-decoration:none;}#yiv0969713651 #yiv0969713651ygrp-sponsor #yiv0969713651ygrp-lc {font-family:Arial;}#yiv0969713651 #yiv0969713651ygrp-sponsor #yiv0969713651ygrp-lc #yiv0969713651hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv0969713651 #yiv0969713651ygrp-sponsor #yiv0969713651ygrp-lc .yiv0969713651ad {margin-bottom:10px;padding:0 0;}#yiv0969713651 #yiv0969713651actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv0969713651 #yiv0969713651activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv0969713651 #yiv0969713651activity span {font-weight:700;}#yiv0969713651 #yiv0969713651activity span:first-child {text-transform:uppercase;}#yiv0969713651 #yiv0969713651activity span a {color:#5085b6;text-decoration:none;}#yiv0969713651 #yiv0969713651activity span span {color:#ff7900;}#yiv0969713651 #yiv0969713651activity span .yiv0969713651underline {text-decoration:underline;}#yiv0969713651 .yiv0969713651attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv0969713651 .yiv0969713651attach div a {text-decoration:none;}#yiv0969713651 .yiv0969713651attach img {border:none;padding-right:5px;}#yiv0969713651 .yiv0969713651attach label {display:block;margin-bottom:5px;}#yiv0969713651 .yiv0969713651attach label a {text-decoration:none;}#yiv0969713651 blockquote {margin:0 0 0 4px;}#yiv0969713651 .yiv0969713651bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv0969713651 .yiv0969713651bold a {text-decoration:none;}#yiv0969713651 dd.yiv0969713651last p a {font-family:Verdana;font-weight:700;}#yiv0969713651 dd.yiv0969713651last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv0969713651 dd.yiv0969713651last p span.yiv0969713651yshortcuts {margin-right:0;}#yiv0969713651 div.yiv0969713651attach-table div div a {text-decoration:none;}#yiv0969713651 div.yiv0969713651attach-table {width:400px;}#yiv0969713651 div.yiv0969713651file-title a, #yiv0969713651 div.yiv0969713651file-title a:active, #yiv0969713651 div.yiv0969713651file-title a:hover, #yiv0969713651 div.yiv0969713651file-title a:visited {text-decoration:none;}#yiv0969713651 div.yiv0969713651photo-title a, #yiv0969713651 div.yiv0969713651photo-title a:active, #yiv0969713651 div.yiv0969713651photo-title a:hover, #yiv0969713651 div.yiv0969713651photo-title a:visited {text-decoration:none;}#yiv0969713651 div#yiv0969713651ygrp-mlmsg #yiv0969713651ygrp-msg p a span.yiv0969713651yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv0969713651 .yiv0969713651green {color:#628c2a;}#yiv0969713651 .yiv0969713651MsoNormal {margin:0 0 0 0;}#yiv0969713651 o {font-size:0;}#yiv0969713651 #yiv0969713651photos div {float:left;width:72px;}#yiv0969713651 #yiv0969713651photos div div {border:1px solid #666666;min-height:62px;overflow:hidden;width:62px;}#yiv0969713651 #yiv0969713651photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv0969713651 #yiv0969713651reco-category {font-size:77%;}#yiv0969713651 #yiv0969713651reco-desc {font-size:77%;}#yiv0969713651 .yiv0969713651replbq {margin:4px;}#yiv0969713651 #yiv0969713651ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv0969713651 #yiv0969713651ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv0969713651 #yiv0969713651ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv0969713651 #yiv0969713651ygrp-mlmsg select, #yiv0969713651 input, #yiv0969713651 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv0969713651 #yiv0969713651ygrp-mlmsg pre, #yiv0969713651 code {font:115% monospace;}#yiv0969713651 #yiv0969713651ygrp-mlmsg * {line-height:1.22em;}#yiv0969713651 #yiv0969713651ygrp-mlmsg #yiv0969713651logo {padding-bottom:10px;}#yiv0969713651 #yiv0969713651ygrp-msg p a {font-family:Verdana;}#yiv0969713651 #yiv0969713651ygrp-msg p#yiv0969713651attach-count span {color:#1E66AE;font-weight:700;}#yiv0969713651 #yiv0969713651ygrp-reco #yiv0969713651reco-head {color:#ff7900;font-weight:700;}#yiv0969713651 #yiv0969713651ygrp-reco {margin-bottom:20px;padding:0px;}#yiv0969713651 #yiv0969713651ygrp-sponsor #yiv0969713651ov li a {font-size:130%;text-decoration:none;}#yiv0969713651 #yiv0969713651ygrp-sponsor #yiv0969713651ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv0969713651 #yiv0969713651ygrp-sponsor #yiv0969713651ov ul {margin:0;padding:0 0 0 8px;}#yiv0969713651 #yiv0969713651ygrp-text {font-family:Georgia;}#yiv0969713651 #yiv0969713651ygrp-text p {margin:0 0 1em 0;}#yiv0969713651 #yiv0969713651ygrp-text tt {font-size:120%;}#yiv0969713651 #yiv0969713651ygrp-vital ul li:last-child {border-right:none !important;}#yiv0969713651  

1548304295036blob.jpg (59K) Download Attachment
Tio
Reply | Threaded
Open this post in threaded view
|

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

Tio


Salqm BexcellerSaya 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 openYg 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-subscribe@yahoogroups...com
posting ke milis, kirimkan ke: [hidden email]
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@.../
atau (sejak 25-Apr-2011) bisa juga di : http://milis-belajar-excel.1048464.n5.nabble.com/
menghubungi moderators & owners: [hidden email]
keluar dari membership milis (UnSubscribe), kirim mail kosong ke : [hidden email]
---------------------------------------------------------------------   Visit Your Group
    • Privacy • Unsubscribe • Terms of Use
     SPONSORED LINKS              .
Reply | Threaded
Open this post in threaded view
|

Fw: [belajar-excel] Macro untuk mengambil/melihat Serial Number Komputer [2 Attachments]

hendrik karnadi
In reply to this post by hendrik karnadi
 Mr Kid,
Sdh saya coba dan berhasil (file terlampir).Macronya spt ini :
Sub Disp_SN()    Dim SN As String    SN = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2").ExecQuery("Select * from Win32_BaseBoard").itemindex(0).serialnumber    MsgBox SNEnd Sub
Terima kasih,
Salam,HK


   ----- Pesan yang Diteruskan ----- Dari: hendrik karnadi <[hidden email]>Kepada: [hidden email] <[hidden email]>Terkirim: Selasa, 29 Januari 2019 09.03.24 GMT+7Judul: Re: [belajar-excel] Macro untuk mengambil Serial Number Komputer
 Makasih Mr.Kid.Akan saya coba.
Salam,HK

Sent from Yahoo Mail on Android
 
  On Tue, Jan 29, 2019 at 8:31, 'Mr. Kid' [hidden email] [belajar-excel]<[hidden email]> wrote:      

begini :Debug.Print GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2").ExecQuery("Select * from Win32_BaseBoard").itemindex(0).serialnumber

bisa ditulis di immediate window, bisa dimasukkan ke sebuah prosedur, dan sebagainya.




On Thu, Jan 24, 2019 at 11:38 AM hendrik karnadi [hidden email] [belajar-excel] <[hidden email]> wrote:

    

Dear Be-Excel,
Selamat pagi, salam sejahtera.
Pada kesempatan ini saya ingin bertanya :Bagaimanakah perintah Macro di Excel (jika bisa) untuk mengambil Serial Number dari komputer yang sedang kita gunakan ?Saya akan menggunakan Serial Number ini untuk mem-password file Excel.
Di bawah ini adalah Serial Number yang saya dapatkan melalui perintah Cmd:\, WMIC BASEBOARD GET PRODUCT, .....


Terima kasih.

Salam,HK




   
   
 
 
  On Tue, Jan 29, 2019 at 8:31, 'Mr. Kid' [hidden email] [belajar-excel]<[hidden email]> wrote:      

begini :Debug.Print GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2").ExecQuery("Select * from Win32_BaseBoard").itemindex(0).serialnumber

bisa ditulis di immediate window, bisa dimasukkan ke sebuah prosedur, dan sebagainya.




On Thu, Jan 24, 2019 at 11:38 AM hendrik karnadi [hidden email] [belajar-excel] <[hidden email]> wrote:

    

Dear Be-Excel,
Selamat pagi, salam sejahtera.
Pada kesempatan ini saya ingin bertanya :Bagaimanakah perintah Macro di Excel (jika bisa) untuk mengambil Serial Number dari komputer yang sedang kita gunakan ?Saya akan menggunakan Serial Number ini untuk mem-password file Excel.
Di bawah ini adalah Serial Number yang saya dapatkan melalui perintah Cmd:\, WMIC BASEBOARD GET PRODUCT, .....


Terima kasih.

Salam,HK




   
   
 

1548304295036blob.jpg (59K) Download Attachment
=?UTF-8?b?TWVsaWhhdCBTTi54bHNt?= (15K) Download Attachment
Kid
Reply | Threaded
Open this post in threaded view
|

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

Kid
Administrator
In reply to this post by Tio
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 [hidden email]
[belajar-excel] <[hidden email]> 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&messageNum=45197>
> • Reply to sender
> <[hidden email]?subject=Re%3A%20%5Bbelajar-excel%5D%20Macro%20untuk%20mengambil%20Serial%20Number%20Komputer>
> • Reply to group
> <[hidden email]?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:
> [hidden email]
> posting ke milis, kirimkan ke: [hidden email]
> 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@.../
> atau (sejak 25-Apr-2011) bisa juga di :
> http://milis-belajar-excel.1048464.n5.nabble.com/
> menghubungi moderators & owners: [hidden email]
> keluar dari membership milis (UnSubscribe), kirim mail kosong ke :
> [hidden email]
> ---------------------------------------------------------------------
> Visit Your Group
> <https://groups.yahoo.com/neo/groups/belajar-excel/info;_ylc=X3oDMTJmNDU3ZHA5BF9TAzk3MzU5NzE0BGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDdnRsBHNsawN2Z2hwBHN0aW1lAzE1NDg3Mjc0ODc->
>
>
> [image: Yahoo! Groups]
> <https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
> • Privacy <https://info.yahoo.com/privacy/us/yahoo/groups/details..html> •
> Unsubscribe
> <[hidden email]?subject=Unsubscribe> • Terms
> of Use <https://info.yahoo.com/legal/us/yahoo/utos/terms/>
>
> SPONSORED LINKS
> .
>
>
>
Reply | Threaded
Open this post in threaded view
|

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

Tio Adi Bayu Adjie
Maaf Mr. Kid. Belum paham saya.
Untuk no.2 apakah itu artinya harus buka file dulu sama seperti no. 1 ?

Terima kasih jawabannya.


From: [hidden email] [mailto:[hidden email]]
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 [hidden email]..id<mailto:[hidden email]> [belajar-excel] <[hidden email]<mailto:[hidden email]>> 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&messageNum=45197>



Reply to sender <mailto:[hidden email]?subject=Re%3A%20%5Bbelajar-excel%5D%20Macro%20untuk%20mengambil%20Serial%20Number%20Komputer>



Reply to group <mailto:[hidden email]?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: [hidden email]<mailto:[hidden email]>
posting ke milis, kirimkan ke: [hidden email]<mailto:[hidden email]>
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@.../
atau (sejak 25-Apr-2011) bisa juga di : http://milis-belajar-excel.1048464.n5.nabble.com/
menghubungi moderators & owners: [hidden email]<mailto:[hidden email]>
keluar dari membership milis (UnSubscribe), kirim mail kosong ke : [hidden email]<mailto:[hidden email]>
---------------------------------------------------------------------
Visit Your Group<https://groups.yahoo.com/neo/groups/belajar-excel/info;_ylc=X3oDMTJmNDU3ZHA5BF9TAzk3MzU5NzE0BGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDdnRsBHNsawN2Z2hwBHN0aW1lAzE1NDg3Mjc0ODc->
<https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
• Privacy • Unsubscribe • Terms of Use <https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
 <https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
SPONSORED LINKS<https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
<https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
<https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
<https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
.<https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->

<https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
<https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
Kid
Reply | Threaded
Open this post in threaded view
|

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

Kid
Administrator
Yup...


On Fri, Feb 1, 2019 at 5:53 AM Tio Adi Bayu Adjie [hidden email]
[belajar-excel] <[hidden email]> 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:* [hidden email] [mailto:
> [hidden email]]
> *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 [hidden email]..id
> <[hidden email]> [belajar-excel] <[hidden email]>
> 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&messageNum=45197>
> *
>
> •
>
> Reply to sender
> <[hidden email]?subject=Re%3A%20%5Bbelajar-excel%5D%20Macro%20untuk%20mengambil%20Serial%20Number%20Komputer>
>
> •
>
> Reply to group
> <[hidden email]?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:
> [hidden email]
> posting ke milis, kirimkan ke: [hidden email]
> 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@.../
> atau (sejak 25-Apr-2011) bisa juga di :
> http://milis-belajar-excel.1048464.n5.nabble.com/
> menghubungi moderators & owners: [hidden email]
> keluar dari membership milis (UnSubscribe), kirim mail kosong ke :
> [hidden email]
> ---------------------------------------------------------------------
>
> *Visit Your Group
> <https://groups.yahoo.com/neo/groups/belajar-excel/info;_ylc=X3oDMTJmNDU3ZHA5BF9TAzk3MzU5NzE0BGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDdnRsBHNsawN2Z2hwBHN0aW1lAzE1NDg3Mjc0ODc->*
>
>
> <https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
>
> • Privacy • Unsubscribe • Terms of Use
> <https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
>
>
> <https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
>
> SPONSORED LINKS
> <https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
>
> *
> <https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->*
>
> *
> <https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->*
>
> *
> <https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->*
>
> .
> <https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
>
>
>
> <https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
>
>
> <https://groups.yahoo.com/neo;_ylc=X3oDMTJldTB1NzBhBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTU0ODcyNzQ4Nw-->
>
>
>