yg menggunakan file itu bukannya excell tapi
program sodara sendiri (embeded ole)
biar gak ada excell di taskmanager yaa tetep
aja in use
tambahkan baris ini dibawah
objbook.SaveAs
"C:\RECALL_NZMI\Adjusment.xls"
objbook.close
Set objsheet1 = Nothing
Set objapp = Nothing
objbook.close
Set objsheet1 = Nothing
Set objapp = Nothing
Kalo masih gak bisa juga
objbook.SaveAs
"C:\RECALL_NZMI\Adjusment.xls"
objbook.SaveAs
"C:\RECALL_NZMI\dummy.xls"
objbook.close
Set objsheet1 = Nothing
Set objapp = Nothing
objbook.close
Set objsheet1 = Nothing
Set objapp = Nothing
Kalo masih gak bisa jugaaa
masukkan constant ini saat menghapus
FOF_NOCONFIRMATION
(FOF_NOCONFIRMATION =
&H10 )
Kalo masih gak bisa jugaaa
IpinZ
----- Original Message -----
From: "Hasan" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, March 19, 2006 8:21 PM
Subject: [Programmer-VB] Ga bisa
Hapus...
> dari vb, trs saya mo hapus via vb jg, tp kenapa ga bs
> y, katanya file is in use, pdhl kan ga saya buka, tp
> wkt saya restart, emang ada seh betul excel yg
> kebuka,cuma kl dr task manager ko ga keliatan seh???
> salah di script saya ga seh, ini neh scriptnya :
> Set objapp = New Excel.Application
>
> objapp.Visible = False
> Set objbook = objapp.Workbooks.Add
> Set objsheet1 = objapp.Worksheets.Add
>
> objsheet1.Name = Left(Trim("RelotRecall"), 30)
>
> objsheet1.Cells(1, 1).Value =
> Trim(rsAdjustment(0).Name)
> objsheet1.Cells(1, 2).Value =
> Trim(rsAdjustment(1).Name)
> objsheet1.Cells(1, 3).Value =
> Trim(rsAdjustment(2).Name)
> objsheet1.Cells(1, 4).Value =
> Trim(rsAdjustment(3).Name)
> objsheet1.Cells(1, 5).Value =
> Trim(rsAdjustment(4).Name)
> objsheet1.Cells(1, 6).Value = Trim(rsAdjustment
>
> objsheet1.Columns("A:AY").EntireColumn.AutoFit
>
> objsheet1.Range("A2").CopyFromRecordset
> rsAdjustment
> objbook.SaveAs "C:\RECALL_NZMI\Adjusment.xls"
>
> Set objsheet1 = Nothing
> Set objapp = Nothing
>
> Tolong ya rekans, kasih tau saya dimn errornya.O iy,
> sblm ini dijalanin, die jalanin function hapus dulu,
> gini neh..:
> Dim FileOperation As SHFILEOPSTRUCT
> Dim lReturn As Long
> On Error GoTo DelToRecycBin_Err
> With FileOperation
> .wFunc = F0_DELETE
> .pFrom = FileName
> .fFlags = F0F_ALLOWUNDO + F0F_CREATEPROGRESSDLG
> End With
> lReturn = SHFileOperation(FileOperation)
> Exit Function
> DelToRecycBin_Err:
> MsgBox Err.Number & Err.Description
>
> Kalo saya pake ini, muncul kotak konfirmasi hapus or
> tidaknya itu, saya seh mau nya ga pake konfirmasi
> lg,gimana y hrsnya, biar bisa ky yg saya mau td....
>
> Thanx..
> Hasan
Wahana Programmer Groups Links
<*> Untuk mengunjungi sponsor milis ini, klik link berikut:
http://wahanaprogrammer.net
<*> Untuk menghubungi owner milis ini, kirim email ke:
[EMAIL PROTECTED]
<*> Konsultasi pemrogramman bisa chat disini:
Yahoo! Messenger: wahanaprogrammer
SPONSORED LINKS
| Programmer | Indonesia | Basic programming language |
| Computer programming languages | Programming languages | Java programming language |
YAHOO! GROUPS LINKS
- Visit your group "Programmer-VB" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
