Hi,
I'm not an excel expert but try to spend time to understand problems but this has stumped me. There have been a lot of changes in the environment that this file is used in so it could be a number of things, I'll explain a bit of background hoping to give an idea of what is wrong.
Background;
- xlsm has a macro that connects to SAP, looks at certain tables based on information on a sheet in the xlsm, pulls in the data from SAP and then the file does some assigning (it is for financials)
- worked a treat (I think) on Windows 7, then we migrated to Windows 10 (64bit) so I upgraded to Office 16 (64 bit) and SAP 7.40 (32bit)
- There were issues with Office 64bit so I 'downgraded' to Office 2016 32bit and have removed some errors but there is still one remaining
The Issue;
- Clicking on button "Update Actuals from AEP", brings up a prompt box for my username and password (this will be an issue for people trying to fix as they won't be able to access)
- Accepts my password and then bugs on at the following point
The above is part of the retrieve_table_contents function.
I don't seem to be allowed to post attachments with the full code, but happy to send to you through PM, rather than posting on an open forum (as this contains work related stuff).
Thanks
Harry
I'm not an excel expert but try to spend time to understand problems but this has stumped me. There have been a lot of changes in the environment that this file is used in so it could be a number of things, I'll explain a bit of background hoping to give an idea of what is wrong.
Background;
- xlsm has a macro that connects to SAP, looks at certain tables based on information on a sheet in the xlsm, pulls in the data from SAP and then the file does some assigning (it is for financials)
- worked a treat (I think) on Windows 7, then we migrated to Windows 10 (64bit) so I upgraded to Office 16 (64 bit) and SAP 7.40 (32bit)
- There were issues with Office 64bit so I 'downgraded' to Office 2016 32bit and have removed some errors but there is still one remaining
The Issue;
- Clicking on button "Update Actuals from AEP", brings up a prompt box for my username and password (this will be an issue for people trying to fix as they won't be able to access)
- Accepts my password and then bugs on at the following point
PHP:
iCount = 5
i = 0
[B]While Range("Start").Offset(i) <> Range("Stop")[/B]
V = Range("Start").Offset(i).Value
If V > 80000000 And V < 90000000 Then
iCount = iCount + 1
If iCount = 6 Then
wStrb = "AND OBJNR IN ('OR0000" & V
Else
wStrb = "'OR0000" & V
End If
oParam8.Rows.Add
oParam8.Value(iCount, "TEXT") = wStrb & "',"
End If
i = i + 1
Wend
If iCount > 0 Then
oParam8.Value(iCount, "TEXT") = wStrb & "')"
Else
ResBtn = MsgBox("Could not find any IO in Budget sheet !", vbExclamation, "NoSelection!")
Exit Sub
End If
The above is part of the retrieve_table_contents function.
I don't seem to be allowed to post attachments with the full code, but happy to send to you through PM, rather than posting on an open forum (as this contains work related stuff).
Thanks
Harry