Sunday, 15 December 2013

Tipe-tipe industri

Tipe-tipe industri:
1. Advertising
2. Audit
3. Banking
4. Chemical Industry and Banking
5. Computer sience and system development
6. Consumer goods
7. Courier
8. Education and trainning consultant
9. Electrical and instrumentation
10. Entertainment and event organizer
11. Food and beverage
12. Foreign exchange and other financial sector
13. Hotel
14. Human resource service
15. Information technology
16. Insurance
17. Journalism
18. Legal
19. Logistics and transportation
20. Manufacturing
21. Marine
22. Mechanical and automotive service
23. Media and publishing
24. Mining
25. Multimedia
26. Oil & Gas and Geothermal production
27. Oil & Gas and Geothermal production and service
28. Oil & Gas and Geothermal services
29. Security
30. Sport
31. Telecommunication

Saturday, 14 December 2013

How to refer to Cells and Ranges by using A1 notation (VBA)

You want to change value of many / more than one cells at once? You will use range property to do that.

Range properties is great and flexible meaning: Range can be used to refer 1 cell, and also many cells (a block).

You can refer to a cell, for instance we targeting cell A1's value:
sheet1.range("A1").value
we refer to cell A1's value that contained within.

And, you can also refer to many cells (more than 1 cell), for instance:
sheet.range("A1:A2").value
we refer to cell A1's and cell A2's value contained.

Essentially, you should help / navigate Range property with A1 notation.

What is A1 notation? A1 notation could be: A1, A1:A2, A:A, 1:1, A1:D5
A1 means: cell 1 column A
A1:A2 means: cell 1 column A and cell 2 column A
A:A means all cells in column A
1:1 means all cells in row 1
A1:D5 means a block start from A1 to D5. This kind a awkward, but try that on your VBA.


To recap all: in short explanation use this syntax: sheet.range("A1_Notation") and A1 notation could be: A1, A1:A2, A:A, 1:1, and A1:D5


So now try to combine/write them on your VBA editor:
Sheet1.range("A1").value
Sheet.range("A1:A2").value
Sheet.range("A:A").value
Sheet.range("1:1").value
Sheet.range("A1:D5").value

You are done!

PS: Did you notice that Ms. Excel is indexing his row and column with numeric (1, 2, 3, 4,...) and alphabet (A, B, C, D...). So, in referencing a cell in A1 notation, we must use this convention.

Quiz:
1. How could you refer to a block of cells/matrix (3 x 3) that start from D5?
Clue: Sheet1.Range("Start cell : End cell")

2.  Try this sheet.range("A:A, E6:H9").value = 10
What you see?

Wireless security settings on TP-LINK

We will observe this device:
150M Wireless Lite N Router
Model No. TL-WR740N / TL-WR740ND

WEP
Type: {Automatic, Open System, Shared Key}
WEP Key Format: {Hexadecimal, ASCII}
Key Selected WEP Key(Password) Key Type

Look below picture to clarify:

WPA/WPA2 - Enterprise
Version: {Automatic, WPA, WPA2}
Encryption: {Automatic, TKIP, AES}
Radius Server IP: ___
Radius Port: 1812 (1-65535, 0 stands for default port 1812)
Radius password: ___
Group Key Update Period: ___ (in second, minimum is 30, 0 means no update)

 

WPA/WPA2 - Personal
Version: {Automatic(Recommended), WPA-Personal, WPA2-Personal}
Encryption: {Automatic(Recommended), TKIP, AES}
Password: ___
(You can enter ASCII characters between 8 and 63 Hexadecimal characters between 8 and 64.)
Group Key Update Period: ___ seconds (Keep it default if you are not sure, minimum is 30, 0 means no update)


So whats the different between WPA/WPA2 - Enterprise and WPA/WPA2-Personal?

Friday, 13 December 2013

Visual Basic for Applications (VBA) for the Microsoft 2007 Office System Language Reference

1. Microsoft forms Reference --> Helps on Userform and controls and how to program with them using Visual Basic

2. Visual Basic Conceptual Topics --> Helps you to understand Visual Basic Programming

3. Visual Basic Definition --> it is a glossary definition to help you understand concepts presented in this documentation

4. Visual Basic How-To Topics --> To look for useful common procedure, for example, how to use the Object Browser or how to set Visual Basic Environment options

5. Visual Basic Language Reference: The language: all its methods, properties, statements, functions, operators, and objects

6. Visual Basic Add-in model
If you want to customize the Visual Basic Editor, see this language reference for Help on the object model that allows you to extend the environment.

7. Visual Basic User Interface help
Look here for help on interface elements of the Visual Basic Editor, such as commands, dialog boxes, windows, and toolbars

 

How to: Reference Cells and Ranges

How to: Reference Cells and Ranges

A common task when using Visual Basic is to specify a cell or range of cells and then do something with it, such as enter a formula or change the format. You can usually do this in one statement that identifies the range and also changes a property or applies a method.
A Range object in Visual Basic can be either a single cell or a range of cells. The following topics show the most common ways to identify and work with Range objects.

Some ways to reference cells

How to: Refer to All the Cells on the Worksheet
How to: Refer to Cells and Ranges by Using A1 Notation
How to: Refer to Rows and Columns
How to: Refer to Cells by Using Index Numbers
How to: Refer to Cells by Using Shortcut Notation
How to: Refer to Cells Relative to Other Cells
How to: Refer to Cells by Using a Range Object
How to: Refer to Named Ranges
How to: Refer to Multiple Ranges
How to Reference Cells and Ranges

Thursday, 12 December 2013

How to: Add a Table of Contents to a Workbook

How to: Add a Table of Contents to a Workbook


MVP iconThe following code example was provided by MVP Bill Jelen. Bill is the author of 24 books on Microsoft Office Excel. He is a regular guest on TechTV with Leo Laporte and the host of MrExcel.com, which includes more than 300,000 questions and answers about Excel.
The following code example verifies that a sheet named "TOC" already exists. If it exists, the example updates the table of contents. Otherwise, the example creates a new TOC sheet at the beginning of the workbook. The name of each worksheet, along with the corresponding printed page numbers, is listed in the table of contents. To retrieve the page numbers the example opens the Print Preview dialog box. You must close the dialog box and then the table of contents is created.
Sub CreateTableOfContents()
    ' Determine if there is already a Table of Contents
    ' Assume it is there, and if it is not, it will raise an error
    ' if the Err system variable is > 0, you know the sheet is not there
    Dim WST As Worksheet
    On Error Resume Next
    Set WST = Worksheets("Table of Contents")
    If Not Err = 0 Then
        ' The Table of contents doesn't exist. Add it
        Set WST = Worksheets.Add(Before:=Worksheets(1))
        WST.Name = "TOC"
    End If
    On Error GoTo 0
    
    ' Set up the table of contents page
    WST.[A2] = "Table of Contents"
    With WST.[A6]
        .CurrentRegion.Clear
        .Value = "Subject"
    End With
    WST.[B6] = "Page(s)"
    WST.Range("A1:B1").ColumnWidth = Array(36, 12)
    TOCRow = 7
    PageCount = 0

    ' Do a print preview on all sheets so Excel calcs page breaks
    ' The user must manually close the PrintPreview window
    Msg = "Excel needs to do a print preview to calculate the number of pages. "
    Msg = Msg & "Please dismiss the print preview by clicking close."
    MsgBox Msg
    ActiveWindow.SelectedSheets.PrintPreview

    ' Loop through each sheet, collecting TOC information
    For Each S In Worksheets
        If S.Visible = -1 Then
            S.Select
            ThisName = ActiveSheet.Name
            HPages = ActiveSheet.HPageBreaks.Count + 1
            VPages = ActiveSheet.VPageBreaks.Count + 1
            ThisPages = HPages * VPages

            ' Enter info about this sheet on TOC
            Sheets("TOC").Select
            Range("A" & TOCRow).Value = ThisName
            Range("B" & TOCRow).NumberFormat = "@"
            If ThisPages = 1 Then
                Range("B" & TOCRow).Value = PageCount + 1 & " "
            Else
                Range("B" & TOCRow).Value = PageCount + 1 & " - " & PageCount + ThisPages
            End If
        PageCount = PageCount + ThisPages
        TOCRow = TOCRow + 1
        End If
    Next S
End Sub

Saving Documents as Web Pages

Saving Documents as Web Pages

In Microsoft Excel, you can save a workbook, worksheet, chart, range, query table, PivotTable report, print area, or AutoFilter range to a Web page. You can also edit HTML files directly in Excel.

Saving a Document as a Web Page

Saving a document as a Web page is the process of creating and saving an HTML file and any supporting files. To do this, use the SaveAs method, as shown in the following example, which saves the active workbook as C:\Reports\myfile.htm.
ActiveWorkbook.SaveAs _
    Filename:="C:\Reports\myfile.htm", _
    FileFormat:=xlHTML

Customizing the Web Page

You can customize the appearance, content, browser support, editing support, graphics formats, screen resolution, file organization, and encoding of the HTML document by setting properties of the DefaultWebOptions object and the WebOptions object. The DefaultWebOptions object contains application-level properties. These settings are overridden by any workbook-level property settings that have the same names (these are contained in the WebOptions object).
After setting the attributes, you can use the Publish method to save the workbook, worksheet, chart, range, query table, PivotTable report, print area, or AutoFilter range to a Web page. The following example sets various application-level properties and then sets the AllowPNG property of the active workbook, overriding the application-level default setting. Finally, the example saves the range as "C:\Reports\1998_Q1.htm."
With Application.DefaultWebOptions
    .RelyonVML = True
    .AllowPNG = True
    .PixelsPerInch = 96
End With
With ActiveWorkbook
    .WebOptions.AllowPNG = False
    With .PublishObjects(1)
        .FileName = "C:\Reports\1998_Q1.htm"
        .Publish
    End With
End With
You can also save the files directly to a Web server. The following example saves a range to a Web server, giving the Web page the URL address http://example.homepage.com/annualreport.htm.
With ActiveWorkbook
    With .WebOptions
        .RelyonVML = True
        .PixelsPerInch = 96
    End With
    With .PublishObjects(1)
        .FileName = _
        "http://example.homepage.com/annualreport.htm"
        .Publish
    End With
End With

Opening an HTML Document in Microsoft Excel

To edit an HTML document in Excel, first open the document by using the Open method. The following example opens the file "C:\Reports\1997_Q4.htm" for editing.
Workbooks.Open Filename:="C:\Reports\1997_Q4.htm"
After opening the file, you can customize the appearance, content, browser support, editing support, graphics formats, screen resolution, file organization, and encoding of the HTML document by setting properties of the DefaultWebOptions and WebOptions objects.