Solved

Connecting to a MQ Series queue via VBA (Excel Spreadsheet)

Posted on 2004-10-01
3
2,606 Views
Last Modified: 2016-09-25
Anyone have any examples of this being done....it's a shot in the dark but why not.
0
Comment
Question by:greedy1
3 Comments
 
LVL 3

Accepted Solution

by:
KeithWatson earned 100 total points
ID: 12213236
Why not indeed...

You will need to reference the MQAX200.dll in Tools->References

This code assumes the queue manager lives on the same machine, or you have the MQ Client software with appropriate configuration. If not, you'll need to set IP number/port and channel information.

Dim Session As MQSession
Dim QueueManager As MQQueueManager
Dim Queue As MQQueue

Set Session = New MQSession
Set QueueManager = New MQQueueManager

QueueManager.Name="QueueManagerName"
QueueManager.Connect

Set Queue = QueueManager.AccessQueue(“QueueName”, MQOO_OUTPUT)


There is more detail provided in the IBM redbook at:

http://www.redbooks.ibm.com/redbooks/pdfs/sg246506.pdf

Hope that helps,

Keith.
0
 

Author Comment

by:greedy1
ID: 12217421
Awesome...I even made it to the redbook, but didn't clue in on the Active X part, haven't tried it yet but it should be ok.  thanks again.
0
 

Expert Comment

by:Chirag Shrimali
ID: 41814417
Guyz, thanks for the sample code, can you highlight how to use the above code if mq in installed on different. Have browsed net for few days, however unable to make out how to define channel, host and port definations. Any help will be appriciated
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sumDigits challenge 9 150
XML::LibXML and Xpath syntax How do I get attribute of sibling 2 140
Specific format 21 198
CONDITIONAL MAX STATEMENT IN T-SQL 3 59
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

777 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