|
|
Viết bởi: Noname 03-09-10, 09:03 PM Chuyên mục: Ms Excel - Bài trả lời (3) |
|
|
Viết bởi: Noname 03-09-10, 06:34 PM Chuyên mục: Thư viện thủ thuật - Không có hồi đáp |

Function totalDayOfMonth(m As Integer, y As Integer) As Integer
totalDayOfMonth = Day(DateSerial(y, m + 1, 0))
End FunctionPrivate Sub Command0_Click()
Dim m As Integer, y As Integer
m = 2
y = 2010
MsgBox "thang " & m & " nam " & y & " co " & totalDayOfMonth(m, y) & " ngay "
End Sub
|
|
Viết bởi: Noname 02-09-10, 03:20 PM Chuyên mục: Thư viện thủ thuật - Không có hồi đáp |
'reads the value for the registry key i_RegKey
'if the key cannot be found, the return value is ""
Function RegKeyRead(i_RegKey As String) As String
Dim myWS As Object
On Error Resume Next
'access Windows scripting
Set myWS = CreateObject("WScript.Shell")
'read key from registry
RegKeyRead = myWS.RegRead(i_RegKey)
End Function'returns True if the registry key i_RegKey was found
'and False if not
Function RegKeyExists(i_RegKey As String) As Boolean
Dim myWS As Object
On Error GoTo ErrorHandler
'access Windows scripting
Set myWS = CreateObject("WScript.Shell")
'try to read the registry key
myWS.RegRead i_RegKey
'key was found
RegKeyExists = True
Exit Function
ErrorHandler:
'key was not found
RegKeyExists = False
End Function'sets the registry key i_RegKey to the
'value i_Value with type i_Type
'if i_Type is omitted, the value will be saved as string
'if i_RegKey wasn't found, a new registry key will be created
Sub RegKeySave(i_RegKey As String, _
i_Value As String, _
Optional i_Type As String = "REG_SZ")
Dim myWS As Object
'access Windows scripting
Set myWS = CreateObject("WScript.Shell")
'write registry key
myWS.RegWrite i_RegKey, i_Value, i_Type
End Sub'deletes i_RegKey from the registry
'returns True if the deletion was successful,
'and False if not (the key couldn't be found)
Function RegKeyDelete(i_RegKey As String) As Boolean
Dim myWS As Object
On Error GoTo ErrorHandler
'access Windows scripting
Set myWS = CreateObject("WScript.Shell")
'delete registry key
myWS.RegDelete i_RegKey
'deletion was successful
RegKeyDelete = True
Exit Function
ErrorHandler:
'deletion wasn't successful
RegKeyDelete = False
End Function[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"'UniKey"="D:\\Soft\\UniKey4.0\\unikey40RC2-1101-win32\\UniKeyNT.exe"Dim key as String, v as String
key="[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
'UniKey'"
v="D:\\Soft\\UniKey4.0\\unikey40RC2-1101-win32\\UniKeyNT.exe"
RegKeySave key,v
|
|
Viết bởi: Noname 02-09-10, 11:50 AM Chuyên mục: Tin Học Văn Phòng - Không có hồi đáp |
![[Hình: lanico.jpg]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/lanico.jpg)
![[Hình: lanprop.jpg]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/lanprop.jpg)
![[Hình: tcpipi.jpg]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/tcpipi.jpg)
![[Hình: opendns.jpg]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/opendns.jpg)
![[Hình: dnsGoogle.png]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/dnsGoogle.png)
![[Hình: opendns.jpg]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/opendns.jpg)
![[Hình: dnsVnn.png]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/dnsVnn.png)
![[Hình: dnsFPT.png]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/dnsFPT.png)
|
|
Viết bởi: haquocquan 01-09-10, 09:40 AM Chuyên mục: Report - Bài trả lời (1) |
| Chủ đề Mới nhất |
| Discussing diesel generat... -Chuyên mục: MS Word-Đăng bởi lần cuối: Murraymoife-1 Giờ trước- » Bài trả lời: 0- » Lượt xem: 1 |
| uZ8rlF0ykP7dzW5kxD3zdJ6ng... -Chuyên mục: MS Word-Đăng bởi lần cuối: Robertkeeby-9 Giờ trước- » Bài trả lời: 0- » Lượt xem: 1 |
| Quản Lý Phòng Khám Tư Nhâ... -Chuyên mục: Thư Viện Ứng Dụng-Đăng bởi lần cuối: Le Duc-24-09-26, 12:03 AM- » Bài trả lời: 34- » Lượt xem: 8,255 |
| Tạo Form không có khung v... -Chuyên mục: Thư viện thủ thuật-Đăng bởi lần cuối: ongke0711-05-09-26, 10:12 PM- » Bài trả lời: 0- » Lượt xem: 125 |
| Tải hàng loạt hóa đơn PDF... -Chuyên mục: Thành viên giúp nhau-Đăng bởi lần cuối: dotrung-16-08-26, 10:29 PM- » Bài trả lời: 6- » Lượt xem: 142 |
| Quản lý kho bằng Accesss -Chuyên mục: Thảo Luận Access-Đăng bởi lần cuối: AKBui-09-08-26, 12:52 AM- » Bài trả lời: 77- » Lượt xem: 7,849 |
| Tra cứu Mã số thuế - phần... -Chuyên mục: Share Code-Đăng bởi lần cuối: ongke0711-03-07-26, 02:10 PM- » Bài trả lời: 0- » Lượt xem: 147 |
| Đồ cổ đây - một chút hoài... -Chuyên mục: Góc ảnh-Đăng bởi lần cuối: Noname-12-06-26, 09:21 AM- » Bài trả lời: 1- » Lượt xem: 566 |
| Tra cứu thông tin DN qua ... -Chuyên mục: Thư Viện Ứng Dụng-Đăng bởi lần cuối: ongke0711-02-06-26, 11:36 PM- » Bài trả lời: 0- » Lượt xem: 167 |
| Homestay chill đà lat -Chuyên mục: Góc Blogger-Đăng bởi lần cuối: tt1212-01-06-26, 02:51 PM- » Bài trả lời: 0- » Lượt xem: 475 |
| Diễn đàn Thống kê |
|
» Thành viên: 0 » Thành viên mới nhất: Không có ai » Các chủ đề diễn đàn: 0 » Các bài viết diễn: 0 Thống kê đầy đủ |