vb 操作excel问题,大家帮忙看看
在VB中如何设置excel的左右的页边距,假如都设置为1.0,请问如何编写,给出代码者多给分
VB code:
With xlsheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.393700787401575)
.RightMargin = Application.InchesToPoints(0.393700787401575)
End With
关注
录制宏,看代码,修改代码,就这么容易....
VB code:
'先引用excel *.0 object library
Private Sub Command3_Click()
Set ex = CreateObject("Excel.Application")
Set wb = ex.Workbooks.Add '新建excel
Set sh = wb.Sheets(1) '第一个工作表
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.393700787401575)
.RightMargin = Application.InchesToPoints(0.393700787401575)
.TopMargin = Application.InchesToPoints(0.984251968503937)
.BottomMargin = Application.InchesToPoin
相关问答:
为什么C写的DLL文件C、PB能调用VB不能调用?
VB里为什么有的DLL直接通过引用可以使用?有的需要通过declare申明外部函数?这些DLL有什么差别?
1、为什么PB能通过DECLARE声明而VB不行?
2、如果这个dll中的 ......
我有厂家做的ASP的监控录像(DVR)的局域网播放的源程序与控件,想要用ASP.net做一个视频回放的程序(利用他的控件)但不知如下去做,望各位指点。
先搞清楚他们的控件是怎么用的,
然后就直接用好了.
不过,如 ......
我用Delphi写了一个DLL, DLL里有MDI的子窗体,DLL初始化时 传递调用者的TApplication给DLL, 在Delphi7中调用已经通过,但是不知道在VB中有无TApplication对应类型, 是否能在VB中调用?
你好,用instance不是就可以了 ......
大家好,问个vb打印问题
printer.print "dsff"
.....
....
Printer.EndDoc
打印成功后我将执行
sqlstr = "update vc_yh set pr=' 已打印 ', ......
Private Sub Check1_Click()
If Check1.Value = 1 Then
DTP1.Enabled = True
Else
DTP1.Enabled = False
End If
End Sub
Private Sub Check2_Click()
If Check2.Value = 1 Then
DTP2.Enabled = True
Else
......