2009-11-29

Office 2010 Beta Activation issue

When there is a problem on activiting the office beta:
"The setup controller has encountered a problem during install. Please review the log files for further information on the error."


Try the steps below:
1. Launch the setup program "setup.exe" under this location
C:\Program Files\Common Files\microsoft shared\OFFICE14\Office Setup Controller

2. Select "Enter a product key"


3. Click on continue

4. Wait the excel for re-deploy.... and click OK

5. Launch Excel again (or any Office program you like). This option is now back.


6. Wait again for the activiton. Click close when reaching this screen.


7. Restart the Excel. Finish!

2009-11-17

Excel VBA Stub: Rearranging Sheets

Codes for re-ordering worksheet
subSplitAndHideSheets: split and hide sheets that not appeared on list: strSheetsAll

------------------


Sub subLaunch
dim strSheetsAll as string
strSheetsAll = "Sheet1;Sheet3;Sheet2"
call subSplitAndHideSheets(strSheetsAll)
end sub


Sub subSplitAndHideSheets(wbCurr As Workbook, strSheetsAll as string)

Dim strSheets() As String
Dim strSheetsSD
Dim intSheetsCounter As Integer
Dim intSheetsCount As Integer
Dim intCurrSheet As Integer


If strSheetsAll = "" Then
Exit Sub 'Exit sub if not given
End If

Set strSheetSD = CreateObject("Scripting.Dictionary")

strSheets = Split(strSheetsAll, ";")
intCurrSheet = 1
intSheetsCount = UBound(strSheets)
For intSheetsCounter = 0 To UBound(strSheets)
If funcChkSheetExist(wbCurr, strSheets(intSheetsCounter)) Then
strSheetSD.Add (UCase(strSheets(intSheetsCounter))), Nothing
wbCurr.Sheets(strSheets(intSheetsCounter)).Move before:=Sheets(intCurrSheet)
intCurrSheet = intCurrSheet + 1
End If
Next

intSheetsCount = wbCurr.Worksheets.Count
If intSheetsCount <= 1 Then
Exit Sub
End If
For intSheetsCounter = 1 To wbCurr.Worksheets.Count
If wbCurr.Sheets(intSheetsCounter).Visible = xlSheetVisible Then
'set as hidden: if Sheet not exist in given string array and name is not parameters
If Not strSheetSD.exists(UCase(wbCurr.Sheets(intSheetsCounter).Name)) And _
UCase(wbCurr.Sheets(intSheetsCounter).Name) <> STRSHEETNAME_PARAMETERS Then
wbCurr.Sheets(intSheetsCounter).Visible = xlSheetHidden
End If
End If
Next
End Sub

Function funcChkSheetExist(wbCurr As Workbook, strSheet As String)
On Error GoTo errHandling
Dim tmpVal
tmpVal = wbCurr.Sheets(strSheet).Range("A1")
funcChkSheetExist = True
Exit Function
errHandling:
funcChkSheetExist = False
End Function

2009-11-13

Excel: 此"列"不同彼"列"



神把人的語言分拆了,但人們只懂使其更複雜...
下面的是真人真事.

與香港客戶對話:

我:就是這個"列"有問題吧?
客:什麼列? 這兩"行"有問題...
我:ok,我幫你檢查一下這"行".


與大陸同事對話:

我:可以幫忙刪去這個值(欄)嗎?
同事:刪去這"列"對吧?
我:不是這"列",是這"欄".
同事:刪去這"列"就行了嗎?
我:不是這"列",是這"欄"!!!!
同事:...就是這"列"吧,不知你"欄"是什麼意.
...



...投降啦.我以後還是用英語啦

相信這個是比較特別的例子
其他的會是功能上,但做成亂的機會比較少:
樞紐表vs透視表,宏 vs 宏集 vs 巨集.

(2010-01-26 後記: 日本語版本跟簡體版一樣,也是"行"+"列")