Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I created an Expense Voucher spreadsheet that automatically calcs
reimbursements due,using the following code: Function Calc_ME_Charges() 'Initialize variables x = 12 y = 6 ME_total = 0 'Loop through Travel Expenses For Each Cells(x, y) In Cells(21, 24) If Cells(x, y).Value = "ME" Then ME_total = ME_total + Cells(x + 1, y + 1).Value y = y + 3 'Check for end of row If y = 27 Then x = x + 1 'Reset y to beginning of row y = 6 End If End If Loop I get a Visual Basic Compile Error: Variable Required - Can't Assign to this expression, and I am unable to close out of VB. The result on the cells in the Excel Spreadsheet is #NAME?. Any suggestions or ideas to resolve would be appreciated. Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compile Error Argument Not optional | Excel Discussion (Misc queries) | |||
Compile error in hidden module | Excel Discussion (Misc queries) | |||
MS Visual Basic Error...from MAcro | Excel Discussion (Misc queries) | |||
Linking to Visual Basic for Applications Help Files | Excel Discussion (Misc queries) | |||
changing the visual basic in office 2003 to visual studio net | Excel Discussion (Misc queries) |