Solved

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

Posted on 2004-10-01
3
2,708 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum5 challenge 5 102
splitOdd10 challenge 5 125
Adjust the position 3 70
rhino JavaScript import, load 25 108
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 …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

756 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