Sunday, June 14, 2009

Mengatur Tampilan Visual Basic

Untuk mengatur setting tampilan Visual Basic:
  1. pilih menu Tools > Options > Docking
  2. pilih Project Explorer

Thursday, June 11, 2009

Lokasi File

Set fs = Application.FileSearch
With fs
.LookIn = "C:\My Documents"
.Filename = "cmd*.*"
If .Execute > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
Next i
Else
MsgBox "There were no files found."
End If
End With

Monday, June 8, 2009

Cell di Excel tidak bisa klik kanan

Saya menemukan kasus, ketika klik kanan di suatu cell di excel tidak bisa tampil menunya.
Langkahnya:
1. tekan ALT + F11, dan akan tampil VBEditor.
2. klik menu View>Immediate Window.
3. ketikkan : Application.CommandBars("Cell").Enabled = True
4. kemudian jalankan
5. Coba apakah menu klik kanan sekarang sudah bisa Anda lakukan? Semoga berhasil :)

Monday, June 1, 2009

Posisi Baris

PotitionRow1 = ActiveCell.Address
PotitionRow2 = Mid(PotitionRow1, 4, 4)

Sunday, May 31, 2009

Pattern Merah dan Hijau

x = InStr(buff, ReplyFrom)
If x > 0 Then
'header1 = Trim(Mid(buff, 1, x - 1))
Cells(nn, 2).Select
With Selection.Interior
.ColorIndex = 35
.Pattern = xlSolid
End With
Else
Cells(nn, 2).Select
With Selection.Interior
.ColorIndex = 38
.Pattern = xlSolid
End With
End If