軟體: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
這個是程式碼,太詭異了。
請高手大大指導一下,感恩。