SlideShare una empresa de Scribd logo
1 de 8
ktifkan dulu Microsoft Visual Basic, kemudian buatlah sebuah Module dengan cara
klik Menu Insert » Module. dan selanjutnya copy paste kode berikut di Module yang sudah
anda buat.
Public bIsClosing As Boolean
Dim wsSheet As Worksheet
Sub HideAll()
Application.ScreenUpdating = False
For Each wsSheet In ThisWorkbook.Worksheets
If wsSheet.CodeName = "Sheet2" Then
wsSheet.Visible = xlSheetVisible
Else
wsSheet.Visible = xlSheetVeryHidden
End If
Next wsSheet
Application.ScreenUpdating = True
End Sub
Sub ShowAll()
bIsClosing = False
For Each wsSheet In ThisWorkbook.Worksheets
If wsSheet.CodeName <> "Sheet2" Then
wsSheet.Visible = xlSheetVisible
End If
Next wsSheet
Sheet2.Visible = xlSheetVeryHidden
End Sub
Langkah berikutnya adalah pilih ThisWorkbook dan paste kode berikut di dalamnya
Private Sub Workbook_BeforeClose(Cancel As Boolean)
bIsClosing = True
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Cancel = True Or bIsClosing = False Then Exit Sub
Run "HideAll"
End Sub
Private Sub Workbook_Deactivate()
If bIsClosing = False Then Exit Sub
Run "HideAll"
End Sub
Private Sub Workbook_Open()
Run "ShowAll"
End Sub
Sumber Informasi :
http://www.rumahexcel.com/2012/12/memaksa-pengguna-mengaktifkan-
security.html#ixzz3Gavr2I6e
untuk melakukan ini tinggal paste kode-kode berikut di ThisWorkbook
Private Sub Workbook_Activate()
Application.StatusBar = Application.ActiveWorkbook.Path
End Sub
Kode ini akan secara otomatis menampilkan informasi letak file ketika workbook dibuka atau
diaktifkan
Private Sub Workbook_Deactivate()
Application.StatusBar = False
End Sub
Kode ini akan secara otomatis mengembalikan status bar sesuai dengan aslinya
Sumber Informasi :
http://www.rumahexcel.com/2012/11/cara-menampilkan-letak-file-di-
status.html#ixzz3Gb0BZLZ2
Sub Password()
Const DBLSPACE As String = vbNewLine & vbNewLine
Const AUTHORS As String = DBLSPACE & "re-edit by rumahexcel.com"
Const HEADER As String = "Internal Password Remover"
Const VERSION As String = vbNewLine & "version 1.7 (25 feb 2013)"
Const REPBACK As String = DBLSPACE & "Please report failure to
admin@rumahexcel.com"
Const ALLCLEAR As String = DBLSPACE & "The workbook should be cleared, thanks for
your patience"
Const MSGNOPWORDS1 As String = "There were no passwords on your worksheet" &
AUTHORS & VERSION
Const MSGNOPWORDS2 As String = "Please wait while the code working ...." &
DBLSPACE
Const MSGTAKETIME As String = "After pressing OK button this " & "will " & _
"take some time." & DBLSPACE & "Amount of time " & "depends on how many " & _
"different passwords on your workbook "
Const MSGPWORDFOUND1 As String = "You had a Worksheet " & "Structure or" & _
"Windows Password set." & DBLSPACE & "The password found was: " & _
DBLSPACE & "$$" & DBLSPACE & "Note it down for potential future use in" & _
"other workbooks by " & "the same person who set this password." & _
DBLSPACE & "Now to check and clear other passwords." & AUTHORS & VERSION
Const MSGPWORDFOUND2 As String = "You had a Worksheet " & "password" & _
"set." & DBLSPACE & "The password found was: " & DBLSPACE & "$$" & _
DBLSPACE & "Note it down for potential " & "future use in other" & _
"workbooks by same person who " & "set this password." & DBLSPACE & "Now" & _
"to check and clear " & "other passwords." & AUTHORS & VERSION
Const MSGONLYONE As String = "Only structure / windows " & "protected" & _
"with the password that was just found." & ALLCLEAR & AUTHORS & VERSION & _
REPBACK
Dim w1 As Worksheet, w2 As Worksheet
Dim i As Integer, j As Integer, k As Integer, l As Integer
Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer
Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer
Dim PWord1 As String
Dim ShTag As Boolean, WinTag As Boolean
Application.ScreenUpdating = False
With ActiveWorkbook
WinTag = .ProtectStructure Or .ProtectWindows
End With
ShTag = False
For Each w1 In Worksheets
ShTag = ShTag Or w1.ProtectContents
Next w1
If Not ShTag And Not WinTag Then
MsgBox MSGNOPWORDS1, vbInformation, HEADER
Exit Sub
End If
MsgBox MSGTAKETIME, vbInformation, HEADER
If Not WinTag Then
MsgBox MSGNOPWORDS2, vbInformation, HEADER
Else
On Error Resume Next
Do 'dummy do loop
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
With ActiveWorkbook
.Unprotect Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & _
Chr(i2) & Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
If .ProtectStructure = False And .ProtectWindows = False Then
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
MsgBox Application.Substitute(MSGPWORDFOUND1, "$$", PWord1) & _
vbInformation, HEADER
Exit Do 'Bypass all for...nexts
End If
End With
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
Loop Until True
On Error GoTo 0
End If
If WinTag And Not ShTag Then
MsgBox MSGONLYONE, vbInformation, HEADER
Exit Sub
End If
On Error Resume Next
For Each w1 In Worksheets
w1.Unprotect PWord1
Next w1
On Error GoTo 0
ShTag = False
For Each w1 In Worksheets
ShTag = ShTag Or w1.ProtectContents
Next w1
If ShTag Then
For Each w1 In Worksheets
With w1
If .ProtectContents Then
On Error Resume Next
Do 'Dummy do loop
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
.Unprotect Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & _
Chr(i2) & Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
If Not .ProtectContents Then
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
MsgBox Application.Substitute(MSGPWORDFOUND2, "$$", PWord1) & _
vbInformation, HEADER
For Each w2 In Worksheets
w2.Unprotect PWord1
Next w2
Exit Do 'Bypass all for...nexts
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
Loop Until True
On Error GoTo 0
End If
End With
Next w1
End If
MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER
End Sub
Sumber Informasi :
http://www.rumahexcel.com/2013/03/menghapus-password-sheet-dengan-
vba.html#ixzz3Gb0dExrc
Konsep dari tutorial ini adalah mengambil data dari sebuah baris atau beberapa baris yang
kemudian diletakkan kedalam kolom yang diinginkan serta tersusun dengan rapi. dimana
data-data yang diambil dari baris tersebut memiliki kelipatan 2 untuk pembacaan kolomnya.
contoh:
Buatlah data seperti gambar dibawah ini
Untuk memecahnya (antar kolom dalam data baris) menjadi sebuah data yang tersusun rapi
dan mudah dibaca, maka yang dibutuhkan adalah sebuah module seperti berikut :
bar = 2
For a = 5 To 10
b = b + 2
Cells(a, 1) = Cells(bar, b + 0)
Cells(a, 2) = Cells(bar, b + 1)
Next a
Sumber Informasi :
http://www.rumahexcel.com/2014/09/mengisi-kolom-dari-data-baris-
dengan.html#ixzz3Gb2A1PJH
Function ConvertToLetter(iCol As Integer) As String
Dim iAlpha As Integer
Dim iRemainder As Integer
iAlpha = Int(iCol / 27)
iRemainder = iCol - (iAlpha * 26)
If iAlpha > 0 Then
ConvertToLetter = Chr(iAlpha + 64)
End If
If iRemainder > 0 Then
ConvertToLetter = ConvertToLetter & Chr(iRemainder + 64)
End If
End Functio
Setcurrmth = 10
theninyour indirectformula,use ConvertToLetter(currmth)
Ind.Range("H3").FormulaR1C1 = "=INDIRECT("'Sheet 1'!" &
ConvertToLetter(CurrMth) & "&$N$1)"
Ok, so when I do this in VBA:
Code:
Ind.Range("H28").FormulaR1C1 = "=INDIRECT(""'Sheet 1'!"" &
ConvertToLetter(CurrMthCell) &R1C14)"
I get this output in my work sheet:
Code:
=INDIRECT("'C-S3'!" & ConvertToLetter(CurrMthCell) &$N$1)
Any idea why it's not converting the ConvertToLetter(CurrMthCell) part to J?
Thanks,
Formulas:
A B C D E
1 =INDIRECT( "C1" ) 8 9 0
2 =INDIRECT( "D" & 4 ) 3 4 5
3 =INDIRECT( "E" & ROW() ) 9 1 3
4 =SUM( INDIRECT( "C1:E1" ) ) 4 6 2
Results:
A B C D E
1 8 8 9 0
2 6 3 4 5
3 3 9 1 3
4 17 4 6 2
Excelling with Excel #4 – Indirect References
By Todd | Comments (2)
Hi guys. It's Greg the orange cat again with a (very short) Microsoft
Excel tip.
Tip#4: Indirect References
Much of Excel's usefulness comes from an ability to reference cells in formulas. In this case,
the cells themselves function as variables.
Indirect referencing allows you to go one step further, allowing you to put a variable within a
variable.
Examples
Imagine you have a HUGE Excel workbook with many sheets (1 summary sheet, ~50 data
sheets) The summary sheet references data from the many data sheets.
How the summary sheet works
In this example, indirect functions are employed to reference data from (cells within)
different data sheets. For instance: k Cell C3 on the summary sheet references the value of
cell K27 on sheet 3. k An indirect function pulls together values of the following cells: C2
("3", to refer to sheet "3") C1 ("27", to refer to row "27") B3 ("K", to refer to column "K")
Another (less colorful) example of indirect reference use:
http://www.excelfunctions.net/Excel-Indirect-Function.html
Summary
Indirect references allow for dynamic cell referencing, which is surprisingly
powerful. Expertise with indirect references can dramatically reduce the amount of time
required to use / create an otherwise very complex Excel workbook.
If you have any questions about the content of this post, please leave a
comment or contact my young professional ChE friend, Todd Krueger.

Más contenido relacionado

Destacado

Air max5 and_mikrotik_router_board_connection_guide_revised
Air max5 and_mikrotik_router_board_connection_guide_revisedAir max5 and_mikrotik_router_board_connection_guide_revised
Air max5 and_mikrotik_router_board_connection_guide_revisedSlamet Achwandy
 
Tree Octopus. Fact/Fiction?
Tree Octopus. Fact/Fiction?Tree Octopus. Fact/Fiction?
Tree Octopus. Fact/Fiction?hollyrucker4
 
Sports sponsorship and government regulation
Sports sponsorship and government regulationSports sponsorship and government regulation
Sports sponsorship and government regulationLeigh Sherman
 
117368473 kurikulum-2013
117368473 kurikulum-2013117368473 kurikulum-2013
117368473 kurikulum-2013Slamet Achwandy
 
Building the case for improving your project management maturity (P3M3) - PMI...
Building the case for improving your project management maturity (P3M3) - PMI...Building the case for improving your project management maturity (P3M3) - PMI...
Building the case for improving your project management maturity (P3M3) - PMI...Wired Consulting
 

Destacado (9)

Mikrotik+hit
Mikrotik+hitMikrotik+hit
Mikrotik+hit
 
Biblia Sagrada
Biblia SagradaBiblia Sagrada
Biblia Sagrada
 
Air max5 and_mikrotik_router_board_connection_guide_revised
Air max5 and_mikrotik_router_board_connection_guide_revisedAir max5 and_mikrotik_router_board_connection_guide_revised
Air max5 and_mikrotik_router_board_connection_guide_revised
 
Mikrotik+hit
Mikrotik+hitMikrotik+hit
Mikrotik+hit
 
Tree Octopus. Fact/Fiction?
Tree Octopus. Fact/Fiction?Tree Octopus. Fact/Fiction?
Tree Octopus. Fact/Fiction?
 
Sports sponsorship and government regulation
Sports sponsorship and government regulationSports sponsorship and government regulation
Sports sponsorship and government regulation
 
117368473 kurikulum-2013
117368473 kurikulum-2013117368473 kurikulum-2013
117368473 kurikulum-2013
 
Modul quick debserver
Modul quick debserverModul quick debserver
Modul quick debserver
 
Building the case for improving your project management maturity (P3M3) - PMI...
Building the case for improving your project management maturity (P3M3) - PMI...Building the case for improving your project management maturity (P3M3) - PMI...
Building the case for improving your project management maturity (P3M3) - PMI...
 

Similar a Ktifkan dulu microsoft visual basic

Forgot password for protected sheet on Microsoft Excel!?
Forgot password for protected sheet on Microsoft Excel!?Forgot password for protected sheet on Microsoft Excel!?
Forgot password for protected sheet on Microsoft Excel!?perfectpredesti94
 
Headache from using mathematical software
Headache from using mathematical softwareHeadache from using mathematical software
Headache from using mathematical softwarePVS-Studio
 
Accord.Net: Looking for a Bug that Could Help Machines Conquer Humankind
Accord.Net: Looking for a Bug that Could Help Machines Conquer HumankindAccord.Net: Looking for a Bug that Could Help Machines Conquer Humankind
Accord.Net: Looking for a Bug that Could Help Machines Conquer HumankindPVS-Studio
 
PVS-Studio delved into the FreeBSD kernel
PVS-Studio delved into the FreeBSD kernelPVS-Studio delved into the FreeBSD kernel
PVS-Studio delved into the FreeBSD kernelPVS-Studio
 
Consequences of using the Copy-Paste method in C++ programming and how to dea...
Consequences of using the Copy-Paste method in C++ programming and how to dea...Consequences of using the Copy-Paste method in C++ programming and how to dea...
Consequences of using the Copy-Paste method in C++ programming and how to dea...Andrey Karpov
 
PVS-Studio vs Chromium. 3-rd Check
PVS-Studio vs Chromium. 3-rd CheckPVS-Studio vs Chromium. 3-rd Check
PVS-Studio vs Chromium. 3-rd CheckAndrey Karpov
 
Cara membuka workbook yang terproteksi
Cara membuka workbook yang terproteksiCara membuka workbook yang terproteksi
Cara membuka workbook yang terproteksiIrmaoly
 
A Spin-off: Firebird Checked by PVS-Studio
A Spin-off: Firebird Checked by PVS-StudioA Spin-off: Firebird Checked by PVS-Studio
A Spin-off: Firebird Checked by PVS-StudioAndrey Karpov
 
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxCMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxmonicafrancis71118
 
1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answers1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answersAkash Gawali
 
How to make fewer errors at the stage of code writing. Part N3.
How to make fewer errors at the stage of code writing. Part N3.How to make fewer errors at the stage of code writing. Part N3.
How to make fewer errors at the stage of code writing. Part N3.PVS-Studio
 
Of complicacy of programming, or won't C# save us?
Of complicacy of programming, or won't C# save us?Of complicacy of programming, or won't C# save us?
Of complicacy of programming, or won't C# save us?PVS-Studio
 
Analysis of Godot Engine's Source Code
Analysis of Godot Engine's Source CodeAnalysis of Godot Engine's Source Code
Analysis of Godot Engine's Source CodePVS-Studio
 
C++ Interview Question And Answer
C++ Interview Question And AnswerC++ Interview Question And Answer
C++ Interview Question And AnswerJagan Mohan Bishoyi
 
C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answerlavparmar007
 
Learn VBA Training & Advance Excel Courses in Delhi
Learn VBA Training & Advance Excel Courses in DelhiLearn VBA Training & Advance Excel Courses in Delhi
Learn VBA Training & Advance Excel Courses in Delhiibinstitute0
 
Re-checking the ReactOS project - a large report
Re-checking the ReactOS project - a large reportRe-checking the ReactOS project - a large report
Re-checking the ReactOS project - a large reportPVS-Studio
 

Similar a Ktifkan dulu microsoft visual basic (20)

Forgot password for protected sheet on Microsoft Excel!?
Forgot password for protected sheet on Microsoft Excel!?Forgot password for protected sheet on Microsoft Excel!?
Forgot password for protected sheet on Microsoft Excel!?
 
Headache from using mathematical software
Headache from using mathematical softwareHeadache from using mathematical software
Headache from using mathematical software
 
Checking VirtualDub
Checking VirtualDubChecking VirtualDub
Checking VirtualDub
 
Accord.Net: Looking for a Bug that Could Help Machines Conquer Humankind
Accord.Net: Looking for a Bug that Could Help Machines Conquer HumankindAccord.Net: Looking for a Bug that Could Help Machines Conquer Humankind
Accord.Net: Looking for a Bug that Could Help Machines Conquer Humankind
 
PVS-Studio delved into the FreeBSD kernel
PVS-Studio delved into the FreeBSD kernelPVS-Studio delved into the FreeBSD kernel
PVS-Studio delved into the FreeBSD kernel
 
Consequences of using the Copy-Paste method in C++ programming and how to dea...
Consequences of using the Copy-Paste method in C++ programming and how to dea...Consequences of using the Copy-Paste method in C++ programming and how to dea...
Consequences of using the Copy-Paste method in C++ programming and how to dea...
 
PVS-Studio vs Chromium. 3-rd Check
PVS-Studio vs Chromium. 3-rd CheckPVS-Studio vs Chromium. 3-rd Check
PVS-Studio vs Chromium. 3-rd Check
 
Vb script tutorial
Vb script tutorialVb script tutorial
Vb script tutorial
 
Cara membuka workbook yang terproteksi
Cara membuka workbook yang terproteksiCara membuka workbook yang terproteksi
Cara membuka workbook yang terproteksi
 
A Spin-off: Firebird Checked by PVS-Studio
A Spin-off: Firebird Checked by PVS-StudioA Spin-off: Firebird Checked by PVS-Studio
A Spin-off: Firebird Checked by PVS-Studio
 
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxCMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
 
1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answers1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answers
 
How to make fewer errors at the stage of code writing. Part N3.
How to make fewer errors at the stage of code writing. Part N3.How to make fewer errors at the stage of code writing. Part N3.
How to make fewer errors at the stage of code writing. Part N3.
 
Of complicacy of programming, or won't C# save us?
Of complicacy of programming, or won't C# save us?Of complicacy of programming, or won't C# save us?
Of complicacy of programming, or won't C# save us?
 
Analysis of Godot Engine's Source Code
Analysis of Godot Engine's Source CodeAnalysis of Godot Engine's Source Code
Analysis of Godot Engine's Source Code
 
Grounded Pointers
Grounded PointersGrounded Pointers
Grounded Pointers
 
C++ Interview Question And Answer
C++ Interview Question And AnswerC++ Interview Question And Answer
C++ Interview Question And Answer
 
C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answer
 
Learn VBA Training & Advance Excel Courses in Delhi
Learn VBA Training & Advance Excel Courses in DelhiLearn VBA Training & Advance Excel Courses in Delhi
Learn VBA Training & Advance Excel Courses in Delhi
 
Re-checking the ReactOS project - a large report
Re-checking the ReactOS project - a large reportRe-checking the ReactOS project - a large report
Re-checking the ReactOS project - a large report
 

Más de Slamet Achwandy

Más de Slamet Achwandy (13)

studi-warna-komposisi-warna.ppt
studi-warna-komposisi-warna.pptstudi-warna-komposisi-warna.ppt
studi-warna-komposisi-warna.ppt
 
2. PEMBELAJARAN BERDIFERENSIASI.pptx
2. PEMBELAJARAN BERDIFERENSIASI.pptx2. PEMBELAJARAN BERDIFERENSIASI.pptx
2. PEMBELAJARAN BERDIFERENSIASI.pptx
 
Golden Ratio.pptx.pdf
Golden Ratio.pptx.pdfGolden Ratio.pptx.pdf
Golden Ratio.pptx.pdf
 
materi-1.pptx
materi-1.pptxmateri-1.pptx
materi-1.pptx
 
belajar uiux.pptx
belajar uiux.pptxbelajar uiux.pptx
belajar uiux.pptx
 
RUNDOWN_KEGIATAN_TALKSHOW_P5.docx
RUNDOWN_KEGIATAN_TALKSHOW_P5.docxRUNDOWN_KEGIATAN_TALKSHOW_P5.docx
RUNDOWN_KEGIATAN_TALKSHOW_P5.docx
 
BAB_III1.pptx
BAB_III1.pptxBAB_III1.pptx
BAB_III1.pptx
 
dkv1.pptx
dkv1.pptxdkv1.pptx
dkv1.pptx
 
sinkronisasiMapel2021.pptx
sinkronisasiMapel2021.pptxsinkronisasiMapel2021.pptx
sinkronisasiMapel2021.pptx
 
Mengelola web
Mengelola webMengelola web
Mengelola web
 
135928077 instrumen-penilaian-mat-smp
135928077 instrumen-penilaian-mat-smp135928077 instrumen-penilaian-mat-smp
135928077 instrumen-penilaian-mat-smp
 
Soat netrb latihan
Soat netrb latihanSoat netrb latihan
Soat netrb latihan
 
20100325 modul 06_b
20100325 modul 06_b20100325 modul 06_b
20100325 modul 06_b
 

Último

Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Lucknow
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 

Último (20)

Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 

Ktifkan dulu microsoft visual basic

  • 1. ktifkan dulu Microsoft Visual Basic, kemudian buatlah sebuah Module dengan cara klik Menu Insert » Module. dan selanjutnya copy paste kode berikut di Module yang sudah anda buat. Public bIsClosing As Boolean Dim wsSheet As Worksheet Sub HideAll() Application.ScreenUpdating = False For Each wsSheet In ThisWorkbook.Worksheets If wsSheet.CodeName = "Sheet2" Then wsSheet.Visible = xlSheetVisible Else wsSheet.Visible = xlSheetVeryHidden End If Next wsSheet Application.ScreenUpdating = True End Sub Sub ShowAll() bIsClosing = False For Each wsSheet In ThisWorkbook.Worksheets If wsSheet.CodeName <> "Sheet2" Then wsSheet.Visible = xlSheetVisible End If Next wsSheet Sheet2.Visible = xlSheetVeryHidden End Sub Langkah berikutnya adalah pilih ThisWorkbook dan paste kode berikut di dalamnya Private Sub Workbook_BeforeClose(Cancel As Boolean) bIsClosing = True End Sub Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If Cancel = True Or bIsClosing = False Then Exit Sub Run "HideAll" End Sub Private Sub Workbook_Deactivate() If bIsClosing = False Then Exit Sub Run "HideAll" End Sub Private Sub Workbook_Open() Run "ShowAll" End Sub Sumber Informasi : http://www.rumahexcel.com/2012/12/memaksa-pengguna-mengaktifkan- security.html#ixzz3Gavr2I6e
  • 2. untuk melakukan ini tinggal paste kode-kode berikut di ThisWorkbook Private Sub Workbook_Activate() Application.StatusBar = Application.ActiveWorkbook.Path End Sub Kode ini akan secara otomatis menampilkan informasi letak file ketika workbook dibuka atau diaktifkan Private Sub Workbook_Deactivate() Application.StatusBar = False End Sub Kode ini akan secara otomatis mengembalikan status bar sesuai dengan aslinya Sumber Informasi : http://www.rumahexcel.com/2012/11/cara-menampilkan-letak-file-di- status.html#ixzz3Gb0BZLZ2 Sub Password() Const DBLSPACE As String = vbNewLine & vbNewLine Const AUTHORS As String = DBLSPACE & "re-edit by rumahexcel.com" Const HEADER As String = "Internal Password Remover" Const VERSION As String = vbNewLine & "version 1.7 (25 feb 2013)" Const REPBACK As String = DBLSPACE & "Please report failure to admin@rumahexcel.com" Const ALLCLEAR As String = DBLSPACE & "The workbook should be cleared, thanks for your patience" Const MSGNOPWORDS1 As String = "There were no passwords on your worksheet" & AUTHORS & VERSION Const MSGNOPWORDS2 As String = "Please wait while the code working ...." & DBLSPACE Const MSGTAKETIME As String = "After pressing OK button this " & "will " & _ "take some time." & DBLSPACE & "Amount of time " & "depends on how many " & _ "different passwords on your workbook " Const MSGPWORDFOUND1 As String = "You had a Worksheet " & "Structure or" & _ "Windows Password set." & DBLSPACE & "The password found was: " & _ DBLSPACE & "$$" & DBLSPACE & "Note it down for potential future use in" & _ "other workbooks by " & "the same person who set this password." & _ DBLSPACE & "Now to check and clear other passwords." & AUTHORS & VERSION Const MSGPWORDFOUND2 As String = "You had a Worksheet " & "password" & _ "set." & DBLSPACE & "The password found was: " & DBLSPACE & "$$" & _ DBLSPACE & "Note it down for potential " & "future use in other" & _ "workbooks by same person who " & "set this password." & DBLSPACE & "Now" & _ "to check and clear " & "other passwords." & AUTHORS & VERSION Const MSGONLYONE As String = "Only structure / windows " & "protected" & _ "with the password that was just found." & ALLCLEAR & AUTHORS & VERSION & _ REPBACK Dim w1 As Worksheet, w2 As Worksheet Dim i As Integer, j As Integer, k As Integer, l As Integer Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer
  • 3. Dim PWord1 As String Dim ShTag As Boolean, WinTag As Boolean Application.ScreenUpdating = False With ActiveWorkbook WinTag = .ProtectStructure Or .ProtectWindows End With ShTag = False For Each w1 In Worksheets ShTag = ShTag Or w1.ProtectContents Next w1 If Not ShTag And Not WinTag Then MsgBox MSGNOPWORDS1, vbInformation, HEADER Exit Sub End If MsgBox MSGTAKETIME, vbInformation, HEADER If Not WinTag Then MsgBox MSGNOPWORDS2, vbInformation, HEADER Else On Error Resume Next Do 'dummy do loop For i = 65 To 66: For j = 65 To 66: For k = 65 To 66 For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 With ActiveWorkbook .Unprotect Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & _ Chr(i2) & Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) If .ProtectStructure = False And .ProtectWindows = False Then PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _ Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) MsgBox Application.Substitute(MSGPWORDFOUND1, "$$", PWord1) & _ vbInformation, HEADER Exit Do 'Bypass all for...nexts End If End With Next: Next: Next: Next: Next: Next Next: Next: Next: Next: Next: Next Loop Until True On Error GoTo 0 End If If WinTag And Not ShTag Then MsgBox MSGONLYONE, vbInformation, HEADER
  • 4. Exit Sub End If On Error Resume Next For Each w1 In Worksheets w1.Unprotect PWord1 Next w1 On Error GoTo 0 ShTag = False For Each w1 In Worksheets ShTag = ShTag Or w1.ProtectContents Next w1 If ShTag Then For Each w1 In Worksheets With w1 If .ProtectContents Then On Error Resume Next Do 'Dummy do loop For i = 65 To 66: For j = 65 To 66: For k = 65 To 66 For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 .Unprotect Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & _ Chr(i2) & Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) If Not .ProtectContents Then PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _ Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) MsgBox Application.Substitute(MSGPWORDFOUND2, "$$", PWord1) & _ vbInformation, HEADER For Each w2 In Worksheets w2.Unprotect PWord1 Next w2 Exit Do 'Bypass all for...nexts End If Next: Next: Next: Next: Next: Next Next: Next: Next: Next: Next: Next Loop Until True On Error GoTo 0 End If
  • 5. End With Next w1 End If MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER End Sub Sumber Informasi : http://www.rumahexcel.com/2013/03/menghapus-password-sheet-dengan- vba.html#ixzz3Gb0dExrc Konsep dari tutorial ini adalah mengambil data dari sebuah baris atau beberapa baris yang kemudian diletakkan kedalam kolom yang diinginkan serta tersusun dengan rapi. dimana data-data yang diambil dari baris tersebut memiliki kelipatan 2 untuk pembacaan kolomnya. contoh: Buatlah data seperti gambar dibawah ini Untuk memecahnya (antar kolom dalam data baris) menjadi sebuah data yang tersusun rapi dan mudah dibaca, maka yang dibutuhkan adalah sebuah module seperti berikut : bar = 2 For a = 5 To 10 b = b + 2 Cells(a, 1) = Cells(bar, b + 0) Cells(a, 2) = Cells(bar, b + 1) Next a Sumber Informasi : http://www.rumahexcel.com/2014/09/mengisi-kolom-dari-data-baris- dengan.html#ixzz3Gb2A1PJH Function ConvertToLetter(iCol As Integer) As String Dim iAlpha As Integer Dim iRemainder As Integer iAlpha = Int(iCol / 27) iRemainder = iCol - (iAlpha * 26) If iAlpha > 0 Then ConvertToLetter = Chr(iAlpha + 64) End If If iRemainder > 0 Then ConvertToLetter = ConvertToLetter & Chr(iRemainder + 64) End If End Functio Setcurrmth = 10 theninyour indirectformula,use ConvertToLetter(currmth)
  • 6. Ind.Range("H3").FormulaR1C1 = "=INDIRECT("'Sheet 1'!" & ConvertToLetter(CurrMth) & "&$N$1)" Ok, so when I do this in VBA: Code: Ind.Range("H28").FormulaR1C1 = "=INDIRECT(""'Sheet 1'!"" & ConvertToLetter(CurrMthCell) &R1C14)" I get this output in my work sheet: Code: =INDIRECT("'C-S3'!" & ConvertToLetter(CurrMthCell) &$N$1) Any idea why it's not converting the ConvertToLetter(CurrMthCell) part to J? Thanks, Formulas: A B C D E 1 =INDIRECT( "C1" ) 8 9 0 2 =INDIRECT( "D" & 4 ) 3 4 5 3 =INDIRECT( "E" & ROW() ) 9 1 3 4 =SUM( INDIRECT( "C1:E1" ) ) 4 6 2 Results: A B C D E 1 8 8 9 0 2 6 3 4 5 3 3 9 1 3 4 17 4 6 2 Excelling with Excel #4 – Indirect References By Todd | Comments (2) Hi guys. It's Greg the orange cat again with a (very short) Microsoft Excel tip. Tip#4: Indirect References Much of Excel's usefulness comes from an ability to reference cells in formulas. In this case, the cells themselves function as variables. Indirect referencing allows you to go one step further, allowing you to put a variable within a variable.
  • 7. Examples Imagine you have a HUGE Excel workbook with many sheets (1 summary sheet, ~50 data sheets) The summary sheet references data from the many data sheets. How the summary sheet works In this example, indirect functions are employed to reference data from (cells within) different data sheets. For instance: k Cell C3 on the summary sheet references the value of cell K27 on sheet 3. k An indirect function pulls together values of the following cells: C2 ("3", to refer to sheet "3") C1 ("27", to refer to row "27") B3 ("K", to refer to column "K")
  • 8. Another (less colorful) example of indirect reference use: http://www.excelfunctions.net/Excel-Indirect-Function.html Summary Indirect references allow for dynamic cell referencing, which is surprisingly powerful. Expertise with indirect references can dramatically reduce the amount of time required to use / create an otherwise very complex Excel workbook. If you have any questions about the content of this post, please leave a comment or contact my young professional ChE friend, Todd Krueger.