• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 108
  • Last Modified:

Excel VBA - Workbook Connection invlid in function

Attached is a workbook I am creating.  I have two functions called within the Macro GoBtn:  fn_pcp and fn_ip.

The first function works without a problem.  The fn_ip gives me an error that the ocn is invalid.

the two functions are essentially the same except for the connection name and the stored procedures being called by the connection.

I have checked that the connection name exists, "CPOEPhysInpatients"  It does.
I checked that the stored procedure being called in the command text exists, GetCPOEPhysDatasummary_Inpatient.  It does.

Can you review the vba code and let me know where the error is?

Thank you

Glen
CPOE-Report-Card-Summary-Executive.xlsm
0
GPSPOW
Asked:
GPSPOW
1 Solution
 
SimonCommented:
Your VBA code looks fine. I would suggest looking more carefully at the properties of the two connections.
Can you post a screenshot of the error dialog or the exact text from it?
0
 
GPSPOWAuthor Commented:
I reworked the macros and vba and eliminated the functions.

There were no errors with the connections.

Sometimes the communication between my remote laptop and the server can get frustrating.

thanks

Glen
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now