软件:Excel
版本:2013
各位版大晚安。
小弟写了一个Sub(A as integer, B as integer)
呼叫的时候就是会错,错误讯息是语法不正确,此时我只要将B删掉,就可以了。
我在想说,Sub传入的参数会有上限吗?
Sub ImportPDF(item_number As Integer, sequency As Integer)
' 插入PDF调整
Dim PDF As Object
Dim PDFfilename As String
PDFfilename = item_number & ".pdf"
real_locate_row = (sequency - 1) * 36 + 1
Set PDF = ActiveSheet.OLEObjects.Add(Filename:=PDFfilename, Link:=False,
DisplayAsIcon:=False)
With PDF
.Top = ActiveSheet.Cells(real_locate_row, 2).Top
.Left = ActiveSheet.Cells(real_locate_row, 2).Left
.Width = 100
.Height = 200
End With
Set PDF=Nothing
End Sub
这个是程式码,太诡异了。
请高手大大指导一下,感恩。