MAMIBUSSOL
Board Regular
- Joined
- Jun 2, 2011
- Messages
- 95
Hi
what might I be missing with this code
SETAREA - procedure within the same module
PASSWEEKNO - assigned using application.inputbox - value = 0
FILE0 - contains "TEST"
WORKBOOKS(WAGES2) - contains "2009-06-12.xls"
WORKBOOKS(FILE1) - contains "test 2009.xlsm
all of the variable are containing the correct information, however if I highlight
WORKBOOKS(FILE1) - I get <subscript out of range>
I need to tie up to:-
PASSWEEKNO - WEEKNO
FILE0 - SHEET1
WORKBOOKS(WAGES2) - WAGES AS WORKBOOK
WORKBOOKS(FILE1) - FILE AS WORKBOOK
what might I be missing with this code
SETAREA - procedure within the same module
PASSWEEKNO - assigned using application.inputbox - value = 0
FILE0 - contains "TEST"
WORKBOOKS(WAGES2) - contains "2009-06-12.xls"
WORKBOOKS(FILE1) - contains "test 2009.xlsm
all of the variable are containing the correct information, however if I highlight
WORKBOOKS(FILE1) - I get <subscript out of range>
Code:
[SIZE=1]PASSWEEKNO = Application.InputBox("ENTER PAYSLIP NUMBER ?", "PRINT PAYSLIP", Type:=1)
[/SIZE]
Code:
[SIZE=1]SETAREA PASSWEEKNO, FILE0, Workbooks(WAGES2), [B]Workbooks(FILE1)
[/B][/SIZE]
Code:
[SIZE=1]Sub SETAREA(WEEKNO As Variant, Sheet1 As Variant, WAGES As Workbook, FILE As Workbook)
[/SIZE]
I need to tie up to:-
PASSWEEKNO - WEEKNO
FILE0 - SHEET1
WORKBOOKS(WAGES2) - WAGES AS WORKBOOK
WORKBOOKS(FILE1) - FILE AS WORKBOOK
Last edited: