Solved

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

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
only14 challenge 19 63
data scientists and AI 17 68
Line meaning 9 75
PHP question(s) about order of output 9 39
There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
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.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

763 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