Solved

Excel VBA - Workbook Connection invlid in function

Posted on 2015-02-13
2
98 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:
SimonAdept earned 500 total points
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Excel - Scroll Speed 3 24
Excel VBA - UserForm control click 12 35
TT Text To Column Based On Criteria 3 18
TT Add Column 10 11
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

762 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

9 Experts available now in Live!

Get 1:1 Help Now