#If VBA7 Then
Private Declare PtrSafe Function FindWindow Lib "USER32" Alias "FindWindowA" ( _
ByVal lpClassName As String, ByVal lpWindowName As String) As LongPtr
#Else
Private Declare Function FindWindow Lib "USER32" Alias "FindWindowA" ( _
ByVal lpClassName As String, ByVal lpWindowName As String) As Long
#End If
http://stackoverflow.com/questions/29723694/excel-2013-windows-class-names
http://www.jkp-ads.com/articles/apideclarations.asp
http://phorum.study-area.org/index.php?topic=49537.0;wap
https://www.google.com.tw/search?q=VBA+%22%E8%99%95%E7%90%86%E7%A8%8B%E5%BA%8F%E8%AD%98%E5%88%A5%E7%A2%BC%22&oq=VBA+%22%E8%99%95%E7%90%86%E7%A8%8B%E5%BA%8F%E8%AD%98%E5%88%A5%E7%A2%BC%22&gs_l=serp.3...28672.33460.0.33712.5.5.0.0.0.0.168.400.3j2.5.0....0...1c.1.64.serp..0.0.0.xs22cvv6zWA
璉璉 2006-06-03 09:51:56 UTC
PermalinkRaw Message
VBA:
? Hex(Asc("心")) ' Big5
A4DF
? Hex(AscW("心")) ' Unicode
5FC3
所以用 VBA 包一個函數:
Function MyAsc(ByVal strChar As String) As String
MyAsc = Hex(Asc(strChar))
End Function
在工作表用
=MyAsc(A1)
http://microsoft.public.tw.excel.narkive.com/t730ls1c/big-5
https://www.youtube.com/watch?v=kcxK2xw6N0g
https://msdn.microsoft.com/zh-tw/library/s2dy91zy.aspx
http://www.programmer-club.com.tw/ShowSameTitleN/vb/21620.html
Clipboard - 存取剪貼簿
« 於: 2005-09-03, 17:33:42 »
DataObject 是應用程式和剪貼簿(Clipboard)之間的橋樑,
可以透過 DataObject 物件存取剪貼簿的內容。
DataObject 內容會隨著應用程式關閉而消失,
而剪貼簿內容則只要不離開Windows就不會消失。
以下程式會宣告並用到 DataObject 物件型態,
使用前必須確定已引用 MS Forms 2.0 Object Library。
(設定引用程式庫的方式請參考下圖)
Sub 取得剪貼簿內容()
Dim data As New DataObject
data.GetFromClipboard
Range("A1") = data.GetText(1)
End Sub
Sub 寫入剪貼簿()
Dim data As New DataObject
chars = [A1].Characters(3, 5).Text '取得A1部份內容
data.SetText chars '寫入DataObject
data.PutInClipboard '寫入剪貼簿
[B1].Select
ActiveSheet.Paste '再貼到B1
End Sub
Sub 清除剪貼簿內容()
Dim data As New DataObject
Set data = New DataObject
data.SetText ""
data.PutInClipboard
End Sub
你可以對 DataObject 使用 Clear 方法來清除它的內容,
但這方法在這裡並不實際,
不如直接傳送一個空字串到剪貼簿裡,如上面範例。
[附件已被管理員刪除]
http://gb.twbts.com/index.php?PHPSESSID=652f99d86b969ff33dc97941def91e52&topic=1878.msg9449#msg9449
https://www.google.com.tw/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=vba+%E5%89%AA%E8%B2%BC%E7%B0%BF+%E6%B8%85%E9%99%A4
Where is Microsoft Forms 2.0 Object Library?
Search your PC for the FM20.DLL file.
On my PC it is under C:\WINDOWS\system32
https://www.mrexcel.com/forum/excel-questions/482637-excel-2010-where-microsoft-forms-2-0-object-library.html
https://www.google.com.tw/search?q=MS+Forms+2.0+Object+Library&oq=MS+Forms+2.0+Object+Library&aqs=chrome..69i57&sourceid=chrome&ie=UTF-8
ActiveDocument.Content.ListFormat.ConvertNumbersToText