Solved

Excel VBA - Workbook Connection invlid in function

Posted on 2015-02-13
2
99 Views
Last Modified: 2016-02-10
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
Comment
Question by:GPSPOW
2 Comments
 
LVL 18

Accepted Solution

by:
Simon earned 500 total points
ID: 40609508
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
 

Author Closing Comment

by:GPSPOW
ID: 40611151
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now