VB调整Excel格式
Private Sub Cmd_OK_Click()
Dim ExcelAppX As Excel.Application
Dim ExcelBookX As Excel.Workbook
Dim ExcelSheetX As Excel.Worksheet
Dim a(1 To 3) As Single
Dim strFormat As Variant
a(1) = 7.3456
a(2) = 2.43
a(3) = 0
strFormat = "¥#,##0." & String(CLng(TxTNumber.Text), "0") & ";¥-#,##0." & String(CLng(TxTNumber.Text), "0")
Set ExcelAppX = CreateObject("Excel.Application")
Set ExcelBookX = ExcelAppX.Workbooks().Add(App.Path & "\a.xls")
ExcelAppX.Visible = True
Set ExcelSheetX = ExcelBookX.Worksheets("Sheet1")
ExcelSheetX.Cells(1, 1).Value = a(1)
ExcelSheetX.Cells(1, 2).Value = a(2)
ExcelSheetX.Cells(1, 3).Value = a(3)
ExcelSheetX.Cells(1, 1).NumberFormatLocal = strFormat
ExcelSheetX.Cells(1, 2).NumberFormatLocal = strFormat
ExcelSheetX.Cells(1, 3).NumberFormatLocal = strFormat
ExcelAppX.Application.Visible = True
ExcelSheetX.PrintPreview
ExcelAppX.DisplayAlerts = False
Set ExcelAppX = Nothing
Set ExcelBookX = Nothing
Set ExcelSheetX = Nothing
End Sub
相关文档:
Dim p(10000, 1) As Double
Dim num As Integer
Dim ptx As Single
Dim pty As Single
Dim w0, w1, w2, w3 As Single
Private Sub Command1_Click()
Dim t As Single
Dim i As Integer
Dim f0, f1, f2, f3 As Single
Picture1.DrawWidth = 3
For t = 0 To 1 St ......
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION = 2
Priva ......
一 木马的由来
木马,即“特洛伊木马”(trojan horse)。
二 所需要的技术
一个成功的木马,除了制作出相关的程序以外,还需要实现以下几方面的功能。1,木马的隐藏 2,木马的运行 3,木马的复制 4,木马的传播等 ......
IDE:Visual Web Developer 2008 Express Edition
数据库:Access 2007
到http://www.asp.net/ajax/downloads/下载AJAX Control Toolkit,将AjaxControlToolkit.dll拷贝到项目的bin目录下,在工具栏中引入。
WebService的代码:(aaa.asmx)
Public Function GetCompletionList(ByVal prefixText As String, ByVal coun ......
http://zhidao.baidu.com/question/33440250.html
在模块中输入以下代码
Public Declare Function sndPlaySound Lib "winmm" Alias _
"sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
' flag uitzetten
Public Const SND_SYNC = &H0
Public Const SND_ASYNC = &H1 ......