2009年7月18日 星期六

Macro for TimeStamps

link:

code :

Sub MacroTimeStamps_Click()
ActiveCell.FormulaR1C1 = TimeInMS()
Range(ColNo2ColRef(ActiveCell.Column) & "65536").End(xlUp).Offset(1).Select
End Sub

Public Function TimeInMS() As String
'TimeInMS = Strings.Format(Now, "dd-MMM-yyyy HH:nn:ss") & "." & Strings.Right(Strings.Format(Timer, "#0.00"), 2)
TimeInMS = Strings.Format(Now, "HHnnss")
End Function

Function ColNo2ColRef(ColNo As Integer) As String
'converts a column number between 1 and 256 to a column reference (A - IV):
If ColNo <> 256 Then
ColNo2ColRef = "#VALUE!"
Exit Function
End If
ColNo2ColRef = Cells(1, ColNo).Address(True, False, xlA1)
ColNo2ColRef = Left(ColNo2ColRef, InStr(1, ColNo2ColRef, "$") - 1)
End Function

Function ColRef2ColNo(ColRef As String) As Integer
'converts a column reference (A - IV) to a column number between 1 and 256:
ColRef2ColNo = 0
On Error Resume Next
ColRef2ColNo = Range(ColRef & "1").Column
End Function

2009年7月15日 星期三

Presentation

Presentation layers in a human point of view is not GUI for system but document, presentation, graphics. updated web pages ...

Topics concentrated on :
  • parsing document: machine reading
  • writing document: format altering
  • automation: atuomatic produce document by event or time

Process

Process for a personal automation can be any kind of programming !
The truth is:
  • simple: no time and money to develop huge system
  • efficient: everything is wanna save time not use time more
  • reuseable: develop one time reuse it many times

Data Source and Cleansing

Data can come from every where! Internet web page, collected in database, text file or word file your boss just emailed to you. a lot of time and effort is used to collect, convert and cleansing the data you have one hand to a good data source for later analysis and calculating!

For Personal Automation, I will focus on :
  1. inter software or format convertion
  2. import
  3. export and archive
  4. automation on conversion, import, export

Fight what you have not what you want !

Warrior might hope to fight battle with his sharpest and most handy weapon on hand ! But if the war is within your every days life, and if your army not allowed a personalized weapon !

This is everyday we are facing with in our life. When you consider the program or tools you are asked or allowed to use during your work ! And many times even give you the weapon of choice still no one could use it very well and perform a clean cut to the target !

It is often rumored that a grand master swordsman can use anything fight include but not restricted to sword only!

Yes ! Fight what you have and what your company allowed you to use, installed on your computer. So let us define the scope of the weapon on hand now:
  • Standard Tool everyone & every company use it
  • Low Profile Tool easy to install freeware tool free of virus from net
  • choose tools has potential to Customize and Automation.

Standard Tools:

  • M$ Office it is industrial standard to document (WORD), to present (PPT), to spread sheet computing (EXCEL), to store personal relational data (ACCESS)
  • M$ System Script it is like batch file in M$DOS period !

Low Profile Tools:

  • Portable Apps if USB is allowed to carry

Customization:

  • VBA for M$ Office is one example

Automation:

  • I mean scheduling mechanism trigger by event or time scheduler

2009年7月1日 星期三

Personal Automation

Personal Automation is a concept borrowed from Factory Automation(FA), Office Automation (OA). Consider a human as an machine in factory, what is the product this machine can make ? Most of them are office related document, a spread sheet, a presentation slider, a document from company standard form, a graph explained something in business.

If we simplified a human's work in office or student's study in school into a 3-tier process, that is, the source, the process and the presentation, we could clearly define Personal Automation and find tools to help it more accurate and efficient !

Source: Data build in Database, text data in web page or document form, Contact Address book, picture, drawing sketch, video, audio files.

Process: Programming code, interpreter, macro, scheduler, integrated platform...

Presentation: Web page, office document, automatic fill web, system, or document form