Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Using Excel To Call And Run ISeries Programs/queries


I think i'm in the right forum. I have an iSeries(AS400) V5R2 and i would like to set up an Excel file that i could access the DB2 database on teh 400. Is vb the only way to go? I read a writeup on this in a magazine a while back but cannot remember where. What i'm shooting for is something like haveing a sales YTD column and a cell where someone can just key in a customer # and have produce the Sales $ YTD for that customer.

Thanks from a newbie!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Call Out Programs
Just wondering whether can VB call out programs like words, defragment, scandisk and etc which is in the pc.....instead of going through start button or shortcut....what I want is to create a button in vb and when I click the button automatically the program (let say words) will execute...

Call To AS/400 Programs From VB
Is somebody has an examples how to call AS/400 rpg(cobol) programs from VB using Client Access Express?

Call Other Programs To Execute
hi:

i want to call a program to execute itself from VB. and there are some operations i dont know how to do.

if i need to call two files in order to make the program execute, should i just put these two file paths together in one string and separate them by a single space or i should do in another way? i use Createprocess to do the job. what if i want to add an additional command to instruct the program how to execute? how should i do that? i just put the command after the path of the file separated by a single space or i should do another way? and can somebody tell me how Createprocess figures out the path of a file, especially when there are many pathes in the string?

thank you very much!

regards,
irisbeast

How To Call DOS Programs And Put Them Inside A Form?
is it possible to call DOS programs and put them inside a form?
coz i'm making a program that can access Turbo C inside a VB form.
is it possible? if it is, can you help me pls. and post the code here.

there's a sample image that would help you in my question.

sorry for my image, i'm just renting on an internet cafe. so there are no graphics editor. except for MS Paint.

http://i20.photobucket.com/albums/b2...eInterface.bmp

How To Call Exe Programs And Put Inside A Form?
pls. help me!

how to call exe programs and put them inside a form or whatever tool should be use?

there's a sample image that would help you in my question.

sorry for my image, i'm just renting on an internet cafe. so there are no graphics editor. except for MS Paint.

How To Call DOS Programs And Put Them Inside A Form?
is it possible to call DOS programs and put them inside a form?
coz i'm making a program that can access Turbo C inside a VB form.
is it possible? if it is, can you help me pls. and post the code here.

there's a sample image that would help you understand my question.

sorry for my image, i'm just renting on an internet cafe. so there are no graphics editor. except for MS Paint.

http://i20.photobucket.com/albums/b...leInterface.bmp

Ibm Iseries Emulator Help !!
Well... We used to use Attachmate to connect to IBM ISERIES mainframe but our licenses have expired and my company does not wish to renew them. We now have the terminal emulator AKA personal communcations workstation program. With Attachmate we were able to use VB (vb6 and vba) to "control" the session, input data, etc. Now that we dont have Attachmate anymore these programs/procedures dont work anymore. I dont have any experience programming AS400 or any IBM products, but I am well versed in all VB applications. My question is... How can I "convert" or rewrite what we have now to work with the personal communications workstation.
I know the easy answer is to renew the license but that is not my decision.
Can anyone help me find sample code, or give me sample code to get me started? Any help would be appreciated. I have invested many hours into researching possible code and I haven't made any progress.

Thanks in advance.
Brian

Connect To IBM ISeries DB2
Hi all!

I'm beginner. Can you tell me how to connect to IBM iSeries DB2 and get data that does not use an ODBC connection

Please, help me

ADO OLE DB Connection To ISeries - V5R2
Hi,

First post here and i'm hoping you guys can help me out.

I recently distributed a VB app that was connecting to an AS400 that was using V5R1 OS. All was well until we upgraded to V5R2. All users had client access upgraded and ever since then, I have had 3 people (out of 10) who can no longer connect. The failure occurs as soon as the .open of the ado connection is issued. I'm using OLE DB (which seems to be the best connection method). Rolling back client access to V5R1 allows them to successfully connect again.

My question is how can I ensure a reliable connection each time under V5R2?!

Using VB6, SP5 - developed on Win 2000 using ADO 2.7 library. Users on XP OS using MDAC 2.7

Has anyone experienced similar?

TIA

Giger

Updating DBCS Fields In ISeries
I have a table with 3 fields(1st defined as DBCS-ONLY, 2nd defined as DBCS-EITHER, and 3rd defined as DBCS-OPEN). I would like to know how to update Chinese character to those fields.

I am using Client Access (v5r3) for the connection, and tried "INSERT statement" & "Recordset Update", but both result is not ok. Also, how to I add the Shift-Out & Shift-In?


million thx!!

Start Program On As400 Iseries Server
Hello

I have to start an as400 program from a vb6 program and I am having some problems...

CODEFunction testfunction()
On Error GoTo handler
Dim as400Connection As New ADODB.Connection
as400Connection.ConnectionString = strconnAs400
as400Connection.Open
    
Dim cmdtest As New ADODB.Command
Set cmdtest.ActiveConnection = as400Connection

'1    
cmdtest.CommandText = "CALL QSYS.QCMDEXC('CALL PGM (MYLIB/MYPROGRAM)', 0000000026.00000)"

'2
Str = "MYPROGRAM"
cmdtest.CommandText = "{{call qcmdexc ('" & Str & "', " & Format$(Len(Str), "0000000000.00000") & ")}}"

'3
cmdtest.CommandText = "{{call /QSYS.LIB/MYLIB.LIB/MYPROGRAM.PGM}}"

cmdtest.Execute
     
Set cmdtest = Nothing
    
as400Connection.Close
Set as400Connection = Nothing
Exit Function
handler:
If as400Connection.State = 1 Then
    as400Connection.Close
End If
Set as400Connection = Nothing
Set cmdtest = Nothing
End Function

Calling IBM AS400 ISeries APIs QWCRJBST
Can someone please help me. I am relatively new to VB.NET and am trying to call an IBM AS400 ISeries API, QWCRJBST but I am having problems with the results. I have all the connections to the AS400 and can run the command I just am not sure I have all the correct parameters

Can anyone help

                    Dim blank As String = " "
                  
                    Dim parm1 As String = blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank & blank
                    Dim parm2 As String = "60"
                    Dim parm3 As String = oDataSet2.Tables(0).Rows(y).Item("SUMCPI").trim
                    Dim parm4 As String = "JOBS0300"
                    Dim parm5 As String = "X'0000000000000000'C"


                    Dim AS400CMD As String = "CALL PGM(QWCRJBST) PARM(" & parm1 & blank & parm2 & blank & parm3 & blank & parm4 & blank & parm5 & ")"
                    Dim CMD As New System.Data.Odbc.OdbcCommand
                    CMD.Connection = CN
                    CMD.CommandType = CommandType.StoredProcedure
                    CMD.CommandText = "call qsys.qcmdexc('" & AS400CMD & "', " & Format(Len(AS400CMD), "0000000000") & ".00000)"
                    CMD.ExecuteNonQuery()

Showing The ISeries Access Signon Screen
We have a number of people with Client Access for ISeries (AS/400) installed. More recently, we have put "ISeries Access" on people's machines, and I'm having trouble getting a signon screen to appear consistently. Ideally, I want the following:

1. Same code for Client Access or ISeries Access.
2. Using a DSN to the AS/400 and a connection string with "Persist Security Info=True", show the signon screen if necessary. The user ID and password can be totally different from the Windows IDs.
3. Default a user ID, via the DSN or in a VB program. Password to be filled out.

This is really easy in Client Access. Any ideas?

LB

VBA & Excel Web Queries...
The code I am using sets the incoming data destination, but the incoming data also needs to be set, yet I cannot find out how to do that anywhere!

I have been using:
With ActiveSheet.QueryTables.Add(Connection:= _
"FINDER;C:ob_test.iqy" _
, Destination:=Range("A1"))
.FieldNames = False
.RefreshStyle = xlInsertDeleteCells
.RowNumbers = False
.FillAdjacentFormulas = False
.RefreshOnFileOpen = False
.HasAutoFormat = True
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SavePassword = False
.SaveData = True
End With




Help!

How can I set the source data cell?

Thanks,
C

<a href="http://www.web-design-shop.co.uk">http://www.web-design-shop.co.uk</a>

Excel Web Queries
Hi,

I use web query to import the information to sheet1. The datas of sheet2 are calculated from the information in sheet1.

My problem is when I do a refresh on sheet1 and if there are some rows added/moved, the formulas of sheet2 don't change dynamically.

Thanks alot for your help.

Making Queries On Excel
i have connected to excel from vb 6 :

Code:
Sub OpenExcel7Sheet()
Dim dbs As Database
Dim rst As Recordset
Dim intNumRecords As Integer

' Open the Microsoft Excel workbook named Data.xls without exclusive access
' and with read/write permissions.
Set dbs = OpenDatabase(App.Path + "db1.xls", False, False, "Excel 8.0;HDR=No;")

' Create a Recordset from the worksheet. The dollar sign character following
' the sheet name tells the installable ISAM that the code is referencing the
' entire sheet.
Set rst = dbs.OpenRecordset("Sheet1$")

' Use the MoveLast method to populate the Recordset; use the RecordCount
' property to count the records and display a message that gives the results.
rst.o
rst.MoveLast
intNumRecords = rst.RecordCount
MsgBox "There are " & intNumRecords & " rows in this worksheet."
rst.Close
End Sub


now i want to make a sleect query's!
how do i do that?>
thnaks i nadvance
peleg

Excel Queries Access
I am having trouble making this query work. The problem occurs when .refresh is called. "General ODBC Error" is the result.

The macro is in Excel 2003, and it is trying to pull data from a database in Access 2003.

Also, when I run this, and it is not able to refresh, I then tried to just refresh the query in Excel and got this message:

"Too few paramaters. Expected 2" -- Yes, I looked this up and there are answers. However, my programming skills are too elementary for me to comprehend the explanation. Can anyone break it down for a simpleton like me?

Thanks, Randy

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 8/23/2004 by Lance
'

'
thename = Left(ActiveWorkbook.Name, 4)
thedrill = Left(ActiveSheet.Name, 3)
For x = 1 To Worksheets.Count
Sheets(x).Select
Range("C1").Select
With Selection.QueryTable
.Connection = _
"ODBC;DSN=MS Access Database;DBQ=C: empCARES_DTT.mdb;DefaultDir=C: emp;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;"
.CommandText = Array( _
"SELECT RAW_DTT.Client, RAW_DTT.Drill_Number, RAW_DTT.Drill_Name, RAW_DTT.Date, RAW_DTT.Tutor, RAW_DTT.Drill_Type, RAW_DTT.Num_RR, RAW_DTT.Trial_1, RAW_DTT.Trial_2, RAW_DTT.Trial_3, RAW_DTT.Trial_4, RA" _
, _
"W_DTT.Trial_5, RAW_DTT.Trial_6, RAW_DTT.Trial_7, RAW_DTT.Trial_8, RAW_DTT.Trial_9, RAW_DTT.Trial_10, RAW_DTT.Trial_11, RAW_DTT.Trial_12, RAW_DTT.Trial_13, RAW_DTT.Trial_14, RAW_DTT.Trial_15" & Chr(13) & "" & Chr(10) & "FROM `C:" _
, _
"tempCARES_DTT`.RAW_DTT RAW_DTT" & Chr(13) & "" & Chr(10) & "WHERE (RAW_DTT.Client=" & thename & ") AND (RAW_DTT.Drill_Name=" & thedrill & ")" & Chr(13) & "" & Chr(10) & "ORDER BY RAW_DTT.Date" _
)
.Refresh Background = False
End With
Next
End Sub

SAP BW Queries In Excel Macros
Integration of SAP BW Queries in Excel Macros with
Visual Basic.

Does anybody know if it is possible to start SAP-BW
Queries out from an an excel-macro based on Visual
Basic? I want to use the data of several queries in an
excel worksheet.
Thanks for any help.

Nina Meier

Custom SQL Queries Between Excel/Access
This is the background:
I am using Excel as a front-end and want to be able to perform custom access queries. eg
SELECT * FROM APPOINTMENTS WHERE EMPLOYEENAME = "JON DOE"

What is the best way of doing this? I want to be able to take that data and read it into various places on the sheet.

For other projects I have used the "Get external data" function, but I cannot use this here as the "WHERE..." part of the statement will change with each click. Is there a way that I can use VBA to write my own queries? Possibly to have them returned in the same format as the "get external data"?

-Toby

Can You Do SQL Type Queries In Excel Worksheet
Hi,

Is there a way to do SQL type queries in a worksheet. I have some data in a worksheet that is time and date stampped. It is populated by a front end VB program. I Need to allow the users to enter a date range, nad then extract that data form the sheet and print a report. Also is there a way to get/extract quaterly reports form my data.
thank
savi

Using Excel Functions In Access Queries
Hi There

I know that by using automation we can use Excel functions in Access, for simple Functions like RoundUp ….. I have no Problem, Codes like below would do the Job;

Public Function Roundup(Abb As Double, Acc As Double)
Dim objExcel As Excel.Application
Set objExcel = CreateObject("Excel.Application")
Roundup = objExcel.WorksheetFunction.Roundup(Abb, Acc)
Set objExcel = Nothing
End Function

But for Functions that require a Range or Array, here I have some problem, I appreciate any recommendations on using Functions such as “Match”, and “Index”, as you know Match Functions finds the Position or rank of a Value in a Range or Array, and Index function Finds a Record in a Range or array by knowing its Vertical, and horizontal Position in that Range.

Regards
sansan



Edited by - sansan777 on 5/25/2008 8:25:04 AM

Executing Access Queries From Excel
Hi Gurus,

I have a problem with the following segment of VBA code which I execute from MS-Excel. In this what I am trying to do is to
1. Open some two queries from a database (in this e.g., it is the sample database Northwind.mdb).
2. Select one of them and select all records in it.
3. Copy & paste it in the current Excel sheet.
4. Close the queries.
5. Close the database.
6. Quit MS-Access.

What is my Problem in this ?
It works fine the first time. But when I rerun the same segment changing my current cell to some other cell in either the same sheet or some other sheet, the code gives an error.
"Run-time error '462': The remote server machine does not exist or is unavailable".
The error comes in the line numbered 6.
I
-----------------

1 Sub testopendb3()
2 Dim objAccess as Object
3 set objAccess = GetObject _
4 ("C:Program FilesMicrosoft OfficeOfficeSamplesNorthwind.mdb")
5 objAccess.Visible = true
6 DoCmd.OpenQuery "Category Sales for 1995", , acReadOnly
7 DoCmd.OpenQuery "Current Product List", , acReadOnly
8 DoCmd.SelectObject acQuery, "Category Sales for 1995", false
9 DoCmd.RunCommand acCmdSelectAllRecords
10 DoCmd.RunCommand acCmdCopy
11 ActiveSheet.Paste
12 DoCmd.Close acQuery, "Category Sales for 1995", acSaveNo
13 DoCmd.Close acQuery, "Current Product List", acSaveNo
14 CloseCurrentDatabase
15 Quit acQuitPrompt
16 End Sub



-----------------

Can somebody out there help ?

Thank you.
Kumar.

Executing MS-Access Queries To Get Data In Excel.
Hi Gurus,

I have a problem with the following segment of VBA code which I execute from MS-Excel. In this what I am trying to do is to
1. Open some two queries from a database (in this e.g., it is the sample database Northwind.mdb).
2. Select one of them and select all records in it.
3. Copy & paste it in the current Excel sheet.
4. Close the queries.
5. Close the database.
6. Quit MS-Access.

What is my Problem in this ?
It works fine the first time. But when I rerun the same segment changing my current cell to some other cell in either the same sheet or some other sheet, the code gives an error.
"Run-time error '462': The remote server machine does not exist or is unavailable".
The error comes in the line numbered 6.
-----------------

1 Sub testopendb3()
2 Dim objAccess as Object
3 set objAccess = GetObject _
4 ("C:Program FilesMicrosoft OfficeOfficeSamplesNorthwind.mdb")
5 objAccess.Visible = true
6 DoCmd.OpenQuery "Category Sales for 1995", , acReadOnly
7 DoCmd.OpenQuery "Current Product List", , acReadOnly
8 DoCmd.SelectObject acQuery, "Category Sales for 1995", false
9 DoCmd.RunCommand acCmdSelectAllRecords
10 DoCmd.RunCommand acCmdCopy
11 ActiveSheet.Paste
12 DoCmd.Close acQuery, "Category Sales for 1995", acSaveNo
13 DoCmd.Close acQuery, "Current Product List", acSaveNo
14 CloseCurrentDatabase
15 Quit acQuitPrompt
16 End Sub



-----------------
Can somebody out there help ?

Thank you.
Kumar.

How To Call Excel From Vb And Save The Contents Of Excel Sheet In To Database
Hi folks

I want to retrive the details from Database to excel sheets.After displaying the data in excel sheets from Dataabse, let the user update the record the record and now the updated record should be saved in database

How To Call Dos-mode Programs Into Window Mode? Or Put Them In Form? Anyone Pls. Help
How to call dos-mode programs into window mode? or put them in form? anyone pls. help

VBA Calling Other Programs In Excel
Hi,
Not sure if this is really the right place for this thread but....I am trying to get Excel to call another program (written in prolog). Is this actually possible? Please help!

New To Excel VB Programs - Looking For Drop Down Help
I have used C / C++ / Perl / etc but never VB. I have a project where I have a sheet called Data inside Data.xls. I put in a drop down list with about 48 items. I changed the list name from Drop Down 42 to AreaSelection since the list is a list of areas to choose from. I have a series of macros and the idea is to have the user select the area using the drop down list and have the appropriate macro run based off of the area selected. Here is my question: How do I code this properly. I can not get this to work since I am not familiar with the various objects and functions of VB in Excel. I tried to use a String but that did not work. Here is the code I thought would work. What am I missing? What should I use to get the value selected by the user?

Sub MyAreaSelection()

Dim MyArea As String

' The following assignment is not working...why?
MyArea = Data.xls!AreaSelection.Value

If MyArea = "San Mateo - Other" Then Application.Run "Data.xls!SANMATEOOther"

End Sub

Problems With BIG Excel Programs?
Has anyone else encountered problems when dealing with BIG Excel files that also have a lot of VBA code behind them?

A few years back, I inherited an Excel program that was a mixture of Excel formulas and VBA. It was created like an onion - with one layer added on top of the other to add features as needed.

The file is about 8Mb. Part of the reason for the size is that a couple sheets hold our parts lists. When I extracted thsoe two sheets, the workbook holding them was over 4Mb itself. There is also a LOT of VBA code (several modules, one class module, several forms) as well as some of the old fashioned dialogue boxes.

The people running the program don't seem to have issues. However, with me going back and forth between the VBA and Excel (programming it rather than just running it), I have had many many problems. Two computers had to be reformatted because Excel completely stopped running.

Has anyone else ever seen something like this?

Using Excel Spreadsheets In VB6 Programs
I developed a VB6 program that reads data from an big Excel workbook that the programs opens as invisible. The procesing time is longer and it is possible that the user opens a second workbook to do a diferent task during the procesing time. When it happen the second workbook is open in the same Excel instance making it visible, and the application aborts. There is a way to instruct the OS to do not open the second workbook in the same instance of Excel, forcing it to open a second instance of Excel?

Exporting Data From Other Programs Through VB To Excel?
I have some HMI software designed by Siemens, I'm trying to pull some data from this software into excel.

What is the first step at seeing how to handle this?

I have literally no documentation what so ever from Siemens explaining how to do this.

I can do it via VB script within their software, but I actually want excel to go out to the HMI software and pull values in for certain events. Not the other way around.

Check Running Programs/processes From Excel
Can anyone tell me a way to (in an Excel macro) show what other programs are running in windows? (I'm using WinNT 4.0 sp6 if that matters).

For instance: if internet explorer is running in another window, I want to be able to have my workbook macro tell me.

Thanks!

Transforming Access Queries To SQL Queries
Hello,
Just wondering if somebody can help me out transforming these "Select" statement for MS SQL.

Dim cn As ADODB.Connection
Dim RS As ADODB.Recordset
Dim str As String

Set cn = New ADODB.Connection
Set RS = New ADODB.Recordset
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:SDBSignage ProgramSignage.mdb;Persist Security Info=False"
cn.CursorLocation = adUseClient
cn.Open

'Create an SQL Statement
str = _
SELECT [sku], [Feat1], [Feat2], [Feat3], [Feat4], [Feat5], IIf([Feat1]<>"","l") AS [Bullet 1], IIf([Feat2]<>"","l") AS [Bullet 2], IIf([Feat3]<>"","l") AS [Bullet 3], IIf([Feat4]<>"","l") AS [Bullet 4], IIf([Feat5]<>"","l") AS [Bullet 5]
FROM SignageTable
ORDER BY [sku];


'Execute the statement.
RS.Open str, cn

cn.Close

These "Select" statement only works on MS Access and I'm new to using MS SQL.

EXCEL Sub Call
hi guys...

I have a sub ShowMessage() defined in a module in excel...and when i run that macro it performs some actions on an excel spreadsheet...

I have a VB program that updates this excel sheet...and reads information from it...excel runs in the background whilst this VB application runs...

Once info has been sent to the excel sheet...I want to run ShowMessage() through the vb program...something like I write in the vb code:

call showmessage() which will run the macro on excel...


any idea on how to accomplish that?

Regards,

Farooq.

Call VB.Net DLL From Excel VBA
How do I call a vb.net dll from an excel VBA macro?

1) I created a keypair using: sn -k mykeypair.snk

2) I added to the .vb file: <Assembly: AssemblyKeyFile("mykeypair.snk")>

3) I created a dll by compiling the project. (The DLL works when called from another dotnet project.)

4) I created a Type Library using: regasm MyDotNetProject.dll /tlb:MyTypeLibrary

5) In the VBA macro IDE, I added a reference to MyTypeLibrary.

The class is in the list When I use the object browser to look for the newly referenced object,
but there are no methods shown. I assume that this is a problem rather than just a quirk.
Note: The class and all of the methods are Public.

Even when I solve the above problem, How do I use the class and its methods.
That is, what is the syntax of the calls?

Any help you can give would be appreciated. Articles, documentation, or examples are welcome.

Thanks,
Gary Minor

Call Excel Sub From VB6
I have a prog that opens up an excel workbook. I am trying to call a sub that is written in the excel workbook (vba) from my vb6 prog.

Is this possible?

Using VBS To Call DLL From Excel
I've written a function in C and I'm trying to call it from Excel using a VBScript. The script is

Code:

Attribute VB_Name = "Test"
Declare Function testfunc Lib "test.dll" (ByVal a As Double) As Double


The function is the following:


Code:

#include <stdio.h>
#include "dllfct.h"

EXPORT double testfunc (double a)
{
double b;
b = 2*a;
return b;
}



This function has the following header file:


Code:

#ifdef BUILD_DLL
#define EXPORT __declspec(dllexport)
#else
#define EXPORT __declspec(dllimport)
#endif

EXPORT double testfunc (double);


I've placed the DLL in the folder C:WINDOWSSYSTEM32 and I've imported the VBScript into Excel. For some reason when I type "=testfunc(3.2)" into Excel I get "#VALUE!" in the cell. I don't know where I've gone wrong. Can anyone offer any suggestions? The FAQ did not clear things up for me.

How To Call C# Dll/tlb From Excel VBA 2002
Hi I have C# dll which is calling native C++ dll function using pInvoke uses dllImport keyword. It is working fine with C# windows application client.

Now I need to use the same function in Excel-VBA interface and so I compiled C# dll project with build option COM interop = true and that created .tlb with dll file as an output. I added reference to .tlb type library file into VBA and created instance of the class but it doesn't recognize the function from c# project.

Below is the code in VBA. Code fails when it calls the myCdllLibFunction.

Sub LoadCmo()

Dim cObj As New cWrapper.myLib

Dim ws As Worksheet
Dim x As String, y As String, z As String
Dim a

a = cObj.myCdllLibFunction(x, y, z)

End Sub

Error I get is as below:

Automation Error: Cannot create file that already Exists.

Please help.

Excel VB - How To Call Sub Routines On Each Row
I have a set of Sub routines which read cell values from a row and write to a series of Cells on the same row in an Excel Sheet. Im trying to call this set by placing a Function on each row which, when run, will call process each row taking values from that row and writing to cells on that row.

I have tried calling the routines from a function (on every row) but any attempt to write back to cells on the sheet causes the whole routine to stop and return a #VALUE! error on the func.

It would appear that the act of writing to cells causes the sheet to autocalculate and stop the whole process.

Any bright ideas?

How To Call Excel Macro From VB
I have record some macro in excel and how am i going to call to execute the macro from vb??

Call Excel Macro
Hello, guys,

If I have an excel macro, can I make VB to call it directly instead of going through re-writing the program from scratch?

I just want to make an executable program through VB and call the excel macro directly.

Thanks a lot.

Call DLL Function From VBA For Excel
Hi,

I am learning programing DLL for excel. I defined a function called LookupCell (an DLL example) in a DLL:

LPXLOPER WINAPI LokupCell(LPXLOPER pxResult, int iROw, int iColumn)

which returns the value of a cell in a sheet by pxResult.
The DLL was sucessfully compiled. Now how can I declare it in the VBA, since there is no corresponding data type of LPXLOPER in Excel VBA? And how can I call it in the VBA?

Thanks for your help in advance,

x88

VB Call To The Excel Object
I have some code that calls the Excel object for one small function of my program.

The call is for an export to an Excel Spreadsheet.

If I use my program on a computer that doesn't have Excel on it crashes because my program is calling the Excel object right when it starts.

Is there a way to make it so that the object is called only when I choose to run that function (the Export) of my program? That way if a user of the program doesn't have excel they could still use all the other functions of the program.

I hope I am asking this in the right forum...

Thanks in advance for the help

-Jeff

How Can I Call A Excel Macro From VB?
I would like to open an excel sheet and enter a value in a cell then call an macro. Is this possible to do with VB? Thanks in advance!

How To Call ActiveX EXE From Excel
Could some one let me know how to call an activex.exe program from excel.

I've tried the getobject method but it didn't work.

Dim CADObject As Object
Set CADObject = GetObject("C:CADSCHEMA.CAD")

basically I want to put part of my VBA code in activex.exe program and call it from excel to protect the source code. I've done this with VB dll file but my users don't have admin access to register the dll. that is why I'm looking for a way to create a activex exe that does not require registration.

any help is appreciated.

How Do You Call A VB Function From Excel?
This is probably an obvious answer (hopefully), but I've read through help online and am fighting to get this to work. I have a VB subroutine (thanks to Legend with his help on that) to solve a system of coupled linear equations. But, I'm unsure how to have excel talk to VB. I understand how to send a single cell in and send a single answer back, but not how to do this with arrays.

If I have to send two arrays into the function and then have one array send back, how to you get these to talk to each other. Does that make sense?

Call An Excel Procedure From VB .net
Hi, hope this the right place to post this.

Basically I have written a bunch of sub procedures in an excel spreadsheet to get my job done and for the most part they work ok (some fine tuning needed of course). Now I need to control excel from vb.net, I have the vb form created and it opens and closes excel the way it should. But when I try to run the excel sub procedures with my vb code I get errors that my code can't find the sub procedure.( actually the error says marco can't be found).

In my research if found articles on the MS site( KB108519 & Calling Visual Basic for Applications Code from Visual Basic.NET) Long story short I've tried the code and it didn't work. I have the book "Visual Studio Tools for Office" and it mentions that macros and sub procedure are in their own worksheet but I have not discovered how to access it or even what the name is. I coming from the OLD Access Basic days so there is a bit of a gap in my knowledge but I do understand OOP. The solution to this problem seems too easy to be difficult but perhaps I'm worng and I'm missing a big part of the answer.

Any help here would be hot

Thanks

How To Call VB Code From Excel?
Can somebody guide me on how can I execute a VB code to read data from an open Excel spreadsheet?

Thanks!

API To Call Excel Sums
Hi, im new to VB and a bit stuck on something:

I have to work out the mean, median, mode, range and stan. dev. of 11 numbers from text boxes when a command button is clicked.

How do i call excel to work this out? im completely new to it and cant even see how you get the commands.

Thanks,
Simon.

How To Call Excel-chart
hello
how to call Excel-chart to display some datas from a .mdb file

Copyright 2005-08 www.BigResource.com, All rights reserved