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.