Sunday, November 24, 2013

Creation folder path using macro

Hi fellows

This is another vba which you can find similar coding through googles. Below is how I do it from excel.

1.  Let's say you want to create many folders in this folder below in C:\dummy\

e.g. folder a, folder b, folder c.

2.  In your excel key in the following as shown below:


In cell B2 type: C:\dummy

In cell E1 onwards, type
a, b, c

3. this vba only works 3 times. You can change the number of times by changing the numbers under for loop

Sub test()

Dim abcfolder As String
Dim path As String



path = Cells(2, 2).Value

On Error Resume Next
MkDir path
On Error GoTo 0





For i = 1 To 3

abcfolder = Cells(i, 5).Value



MkDir path & "\" & abcfolder

Next i

End Sub

4. Then the folders are created.

Sunday, November 17, 2013

MAC Or Windows with "Parallels"

Hi fellows

If you use mac, you may want to switch to use Microsoft Windows Excel like me as I am not familiar with Mac Excel. Plus, some formula cannot be recognized in Mac version. Plus, you just want to use Excel with no other software and you have a software called "Parallels"

You can do it this way.

1. Open Parallels and select windows to start

2. Select it in a non-full screen mode. Full screen does not work in this way.

3. Open your Excel

4. In the "Parallels" icon, right click and select "Enter Coherence"

5. Once it is successful, a window will pop up as shown.


6. Now you use your Excel like in your Mac.

7. If you want to open other programs, just right on your top right hand corner button with "||" symbol. Windows Start Menu will be opened for use.



For your further information / reference:

Enter Modality: Enter in a windows fixed screen size
Enter full screen: it will go to full screen mode. To change to other workspace, you can press "Ctrl + left arrow / right arrow"


Tuesday, November 12, 2013

Excel Tips VBA tools Unprotect worksheet through VBA

Hi

I have been busy with moving from Singapore to Hong Kong and Hong Kong to Singapore. Now, I am back to Hong Kong and have some time to talk about IT stuff.....

This is a VBA code in excel which most people would use for "cracking" their own excel. You may forgot the password of your created in your excel spreadsheet, but you can use these codes to crack. You can find these codes in other websites. By the way, you can find these codes anywhere.

1. Use a new excel book and press "ALT +F11". Insert a new module

2. Paste these codes

Public Sub Password_unprotect()
Dim intPress As Integer
Dim i As Integer, j As Integer, k As Integer
Dim l As Integer, m As Integer, n As Integer
Dim i1 As Integer, i2 As Integer, i3 As Integer
Dim i4 As Integer, i5 As Integer, i6 As Integer
Dim wbsh, tmstrt, attmpt
tmstrt = Timer
attmpt = 0
On Error Resume Next
Set wbsh = ActiveWorkbook.ActiveSheet
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
attmpt = attmpt + 1
wbsh.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)
DoEvents
If wbsh.ProtectContents = False Then
MsgBox "Match found" & "Sheet is now unprotected."

End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
End Sub

3. Here is an example.

Let's say you have a worksheet that is protected.

Step 1: Make another worksheet (CTRL +N) called Book 2

Step 2: Press ALT + F11 to go vba code

Step 3: Select "insert" and then "Module"




Step 4: Place the code in your new module


Step 5: Go to your worksheet that is protected (Book1.xls). Just click the worksheet.

Step 6:  Go to visual basic screen and press run.

Step 7: Ok now your worksheet (book1.xls) is unprotected now.


Just a kindly reminder. Please use this legally and you use it for your own use. :D