SBS - The best value in QMS software

Controlling Minitab by vba (visual basic) or vb

I

Inspector-71

#1
Is it possible to control minitab from another application e.g. access or excel using visual basic or vba.

my specific example is I have an access database which exports a query to excel and produces an individuals chart. i would like to do this in mintab if possible.

working between VBA applications i would use something like

Code:
Dim oExcel As Excel.Application
Dim oChart As Excel.Chart
Set oExcel = Excel.Application
oExcel.Workbooks.Open "/gg.xls"
oExcel.Visible = False
   
With oExcel
.
.
.
End with
could I do somethign similar with mintab and access it's command line?

Thanks for any help.
 
Elsmar Forum Sponsor

Miner

Forum Moderator
Staff member
Admin
#2
Re: Controlling minitab by vba or vb

The short answer is yes. I have seen it done from Excel by a former coworker. Unfortunately, I do not know how he did it.

Allattar is a Cover with knowledge of Minitab macros. Hopefully, he will be able to assist you.
 

reynald

Quite Involved in Discussions
#3
Is it possible to control minitab from another application e.g. access or excel using visual basic or vba.

my specific example is I have an access database which exports a query to excel and produces an individuals chart. i would like to do this in mintab if possible.

working between VBA applications i would use something like

With oExcel


could I do somethign similar with mintab and access it's command line?

Thanks for any help.
Hi,
How about directly accessing your database from minitab? Once i made a executable file that made my minitab connect to MS Access to download data, and then produce reports that i need on a regular basis.

Im not good in macros, all i did was to go to
FILE>>QUERY DATABASE
then go with the instructions.
After that i saved the session history as exec file.
Here is a sample code
Code:
ODBC;
  Connect "DSN=MS Access Database;DBQ=C:\Documents and Settings\rfrancisco\De" &
  "sktop\HDPD DB rev02.mdb;DefaultDir=C:\Documents and Settings\rfrancisco\De" &
  "sktop;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin" &
  ";";
  SQLString "SELECT `Data`,`ID` FROM `MSysAccessObjects`".
 
A

Allattar

#4
The simple answer is yes, but its a bit long.

Basically you need to start Minitab in excel.
Global MTBEXCELapp as mtb.application
should start Minitab
Sub auto_open()
Set MTBEXCELapp = new mtb.application

(inside this sub you can put commands for creating a menu bar)
end sub

The trick here is to send info from excel into Minitab, you need a subcommand to send data to Minitab.
Then use a form to select the range of data you are sending across.

Problem here is I half understand this, and half ripped the code off an example :) which works for me, but it does some odd things at times, like generating lots of menu items.

If you really want the example I have I will need to sense check it a little remove a few things, but I can try and put a simple example up.

If you ask Minitab tech support they should be able to help with an example.
There is also a visual basic project hidden in the Minitab install directory, its in a folder called mymenu, and contains a dll with the project.

Placing the dll into the addin directory in Minitab creates a new menu in Minitab with a couple of examples
 
K

KuoFaye

#5
Hi,

Is it possible to deliver data (in Excel) to Minitab and then get a regression formula?
Then turn this formula back to Excel.

All the processes are controlled by VBA.
Is there any connection between MinitabAddinTLb commands?

Or Allattar has some examples could share?

Thanks for any help.
 
A

Allattar

#6
The Addintlb commands are commands to add dialogue boxes to Minitab. Before you get excited I think it only works in VB6.

you want to look for the MTB Type library commands. Put those in the references.

The Help in Minitab, look for automation, details the command structure.

You have
MTB
MTB.Application
MTB.application.activeproject etc...

Sending a command to Minitab for instance would be
mtb.application.activeproject.executecommand "Minitab command string"

Where the Minitab command string is the macro language/ session window language in Minitab. When you run anything from the menus in Minitab it saves the commands in the history folder, and you can pick these up from there. eg: plot c1*c2 creates a scatterplot.

Getting the formula out of a regression in Minitab back into excel...
Never tried that. Getting graphs yes, formula, could be tricky. The regression tools in Minitab allow you to store the coefficients in the worksheet. Perhaps you can use the columns.column object commands to grab the cells of the coefficients.

Let me know if you need more to help you get started. I know thats only a quick post.
 

reynald

Quite Involved in Discussions
#7
Hi,

Is it possible to deliver data (in Excel) to Minitab and then get a regression formula?
Then turn this formula back to Excel.

All the processes are controlled by VBA.
Is there any connection between MinitabAddinTLb commands?

Or Allattar has some examples could share?

Thanks for any help.
Basic question only: Why not use excel's built-in regression capability?
 
Thread starter Similar threads Forum Replies Date
M Controlling Data Labels on Graphs - Number of Decimal Places Reported - Minitab Using Minitab Software 7
R Controlling Quick Reaction Checklists Document Control Systems, Procedures, Forms and Templates 1
C Identifying and Controlling External Documents Document Control Systems, Procedures, Forms and Templates 3
qualprod Controlling documents in two different Applications ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 10
M AS9100d Controlling External Provided Processes (purchasing 8.4) - The customer want us to use supplier X AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 3
qualprod Minor non-conformance for not controlling local regulation laws? ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 20
Q Controlling Multi-Tab Microsoft Excel Forms Excel .xls Spreadsheet Templates and Tools 5
C Controlling Software Versions that are part of a medical device IEC 62304 - Medical Device Software Life Cycle Processes 2
A ISO 13485 - Controlling Production and Service Provision - Product Catalogues ISO 13485:2016 - Medical Device Quality Management Systems 3
M Difficulties Controlling Foreign Suppliers Supplier Quality Assurance and other Supplier Issues 8
R OHSAS 18001:2007 Section 3 - Controlling Work Place Risks Occupational Health & Safety Management Standards 3
T Controlling an Excel Spreadsheet (Database) ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 3
C ISO 9001:2008 4.2.3(f) - Controlling Documents of External Origin Quality Manager and Management Related Issues 9
M Controlling Flow Charts that are hung in workplace. Quality Manager and Management Related Issues 6
N Controlling Records query that may cause some serious trouble for me ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 8
T Controlling Manual - Control of 10 Printed Manuals throughout our 9 Branches Document Control Systems, Procedures, Forms and Templates 8
Fender1 Controlling Documents and Records in a Custom Weld/Fabrication Company Document Control Systems, Procedures, Forms and Templates 10
C Tool Monitoring - Controlling a Process with Better Tool Monitoring Manufacturing and Related Processes 4
C Controlling QMS - We are expanding globally and want to keep our QMS Confidential Quality Manager and Management Related Issues 20
C Controlling Documents: Beyond the standard, how do we truly define what to control ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 9
R Referencing and Controlling Labels & Stickers used internally throughout Production Document Control Systems, Procedures, Forms and Templates 1
Q Controlling Prints in Shop - Audit Finding Question ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 4
L Controlling "Stamps" used throughout our processing Records and Data - Quality, Legal and Other Evidence 16
T Requirements - Controlling and Maintaining Sheet Metal Templates for Production Use ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 5
P Controlling Solidworks model, CAD & Gerber files Document Control Systems, Procedures, Forms and Templates 3
M Defining and Controlling External Documents (Documents of External Origin) Quality Tools, Improvement and Analysis 5
M Controlling Temperature and Time - Do I need to calibrate the thermostat? IATF 16949 - Automotive Quality Systems Standard 4
S Controlling Documentation - Which procedures to control Document Control Systems, Procedures, Forms and Templates 12
C HACCP in Egg Production - Controlling hazards at the farm level Food Safety - ISO 22000, HACCP (21 CFR 120) 6
T Procedure for "Controlling Nonconformity" for a software company Document Control Systems, Procedures, Forms and Templates 2
R Controlling and monitoring of measuring devices - AS9100 General Measurement Device and Calibration Topics 3
D Establishing and controlling process capability - Meaning of Phrases Capability, Accuracy and Stability - Processes, Machines, etc. 2
E Controlling CNC Machine Programs - Your recommendations appreciated Manufacturing and Related Processes 12
T Controlling filled out "forms" (eg Operator job specific work instructions) Document Control Systems, Procedures, Forms and Templates 3
B Controlling Reference Material Document Control Systems, Procedures, Forms and Templates 1
J Controlling Temperature and Humidity in the CMM Room and does anyone use Artifacts? Inspection, Prints (Drawings), Testing, Sampling and Related Topics 8
R Procedure for Controlling Transmitted Technical Data - ITAR compliance Document Control Systems, Procedures, Forms and Templates 18
S Identifying and Controlling External Documents Document Control Systems, Procedures, Forms and Templates 8
Raffy Controlling Handler, Tester, Computer and other Equipment Manuals. Document Control Systems, Procedures, Forms and Templates 2
H Controlling Continuously Changing Forms IATF 16949 - Automotive Quality Systems Standard 12
W Controlling Revisions of External Documents - Documents of External Origin Document Control Systems, Procedures, Forms and Templates 10
A Controlling Humidity in a Textile Testing Laboratory General Measurement Device and Calibration Topics 10
M Polyurethane Foam Testing and Controlling the Foaming Process Manufacturing and Related Processes 6
G Controlling a male 6% Luer with permanent collar according to EN1707? General Measurement Device and Calibration Topics 5
C Controlling External Customer Documents (Documents of External Origin) Document Control Systems, Procedures, Forms and Templates 5
L "Document Controlling" Queries run to obtain information reported to customer Document Control Systems, Procedures, Forms and Templates 7
A Still Confused About "Controlling Suppliers Records" AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 3
A Controlling the records of suppliers - AS9100 Rev B Clause 4.2.4 AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 2
S Controlling external processes - Alternatives ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 3
K Controlling Forms made in word .doc, excel .xls, and lotus Document Control Systems, Procedures, Forms and Templates 14

Similar threads

Top Bottom