Executing macro in excel
How can a macro in excel be executed through forms6i
Make macros in Excel ( with no parameters )
and do....
arglist := ole2.create_arglist;
ole2.add_arg(arglist, 'copy_vek_itog_sheet');
ole2.invoke(ex_app, 'Run', arglist );
ole2.destroy_arglist(arglist);
copy_vek_itog_sheet - name macro
Similar Messages
-
How do you execute macros in excel using forms--urgent
i want to execute a macro which is in excel from forms. i am using the dde built in. how ever when given the command
dde.execute ( conv_id,'[module1.macro1()]', 1000 );
i get an oracle error. and the macro does not get executed.
how ever when the same was tried for word it worked.
can any one help me in this regards
thanks in advance
sethuraman.rA db procedure as an autonomous transaction may be
sufficient for your needs.No. An autonomous transaction will run in its own transaction, but never in an asynchronous way.
Francois -
SSIS Script task not executing macro through SQL Agent (but it does through bids)
<p>Hello everyone,</p><p>I am having an issue with SQL Agent when executing a macro contained in a script task component. The script task actually opens an excel file, runs the macro, save and closes the file. </p><p>When
I execute the package via BIDS/Visual studio, it works like a charm. However, when i execute the package with SQL agent, the package runs successfully but it seems that the macro is not executed as the excel file has not been modified as it should have. Also,
the history log does not show any error messages. </p><p>Could </p>Thanks!I did create a credential and a proxy too but still the macro is not executed.I have searched online for solutions but no one has experimented this kind of issue before it seems. Please have a look at the script task code:
Imports
Excel = Microsoft.Office.Interop.Excel
Imports
System
Imports
System.Data
Imports
System.Math
Imports
Microsoft.SqlServer.Dts.Runtime
<System.AddIn.AddIn(
"ScriptMain", Version:="1.0",
Publisher:="", Description:="")>
<System.CLSCompliantAttribute(
False)> _
Partial
Public
Class ScriptMain
Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
Enum ScriptResults
Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success
Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
End
Enum
Public
Sub Main()
Dim Macro_name
As
String
Dim ExcelObject
As
New Microsoft.Office.Interop.Excel.Application
Dim oBook
As Microsoft.Office.Interop.Excel.Workbook
Dim oBooks
As Microsoft.Office.Interop.Excel.Workbooks
Try
Macro_name =
"Macro001"
ExcelObject =
CType(CreateObject("Excel.Application"),
Excel.Application)
ExcelObject.Visible =
True
ExcelObject.UserControl =
False
ExcelObject.DisplayAlerts =
False
oBooks = ExcelObject.Workbooks
oBook =
CType(oBooks.Open("C\Book1.xls"),
Excel.WorkbookClass)
ExcelObject.Run(Macro_name)
Catch ex
As Exception
ExcelObject.Application.Quit()
ExcelObject.DisplayAlerts =
True
ExcelObject =
Nothing
End
Try
Dts.TaskResult = ScriptResults.Success
End
Sub
End
Class -
How to execute a macro of excel from a report?
using the FM SAP_CONVERT_TO_XLS_FORMAT.
to run the macro:
CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
call method of h_excel 'WORKBOOKS' = h_mapl.
set property of h_excel 'VISIBLE' = 0.
call method of h_mapl 'OPEN'
EXPORTING
#1 = d_file.
CALL METHOD OF H_EXCEL 'ActiveWorkbook' = h_book .
CALL METHOD OF H_book 'Activesheet' = H_sheet .
CALL METHOD OF h_excel 'RUN'
EXPORTING
#1 = ld_macro. -
Will macros in excel work properly if I switch Office 2013 32 bit to Office 2013 64 bit?
hi,
Will macros in excel created with Office 2013 32 bit work properly if i switch to Office Execl 2013 64 bit?
ThanksHi,
As far as I know, most of the macros might work well between 32bit and 64bit Excel. But there are some limitations for Excel 64bit:
Solutions using ActiveX controls library, ComCtl controls won’t work.
Third-party ActiveX controls and add-ins won’t work.
Visual Basic for Applications (VBA) that contain Declare statements won’t work in the 64-bit version of Office without being updated.
Compiled Access databases, like .MDE and .ACCDE files, won’t work unless they’re specifically written for the 64-bit version of Office.
More reference:
https://msdn.microsoft.com/en-us/library/ff700513(v=office.11).aspx
https://msdn.microsoft.com/en-us/library/ee691831(v=office.11).aspx
https://support.office.com/en-sg/article/Choose-the-32-bit-or-64-bit-version-of-Office-2dee7807-8f95-4d0c-b5fe-6c6f49b8d261?ui=en-US&rs=en-SG&ad=SG
If you have any further question about macros, I recommend you post the question to the MSDN forum for Excel
http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
George Zhao
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs.
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
How to create a Macro in excel to store the excel data to Oracle Database
Hi All
Does anyone has created a macro in excel which on being run stores the excel data to Oracle database. In my project I need to create one such macro for updating oracle database with excel data and another for inserting excel records.
I tried doing this using a macro in MS access but Client wants its to be done using Excel Macro only.
Any help would be highly appreciated.
Thanks in advance..
ShikhaPlease read Chapter 19.7 Creating Selection Lists (http://download.oracle.com/docs/html/B25947_01/web_complex007.htm#CEGFJFED) of the Oracle® Application Development Framework Developer's Guide For Forms/4GL Developers 10g Release 3 (10.1.3.0)
Cheers,
Mick. -
Error executing macro Forecast Invoice Plan
Hello,
We are facing the error in a process chain of DP background processing. The error description is : "Error executing macro Forecast Invoice Plan. " In the details, it shows that the same error is there for all the CVCs of that planning area.
Can someone please throw some light on possible root cause for this error?
Thanks & Regards,
AmitHi Amit,
To start with, check your macro in /SAPAPO/ADVM - Macro Workbench.
Is it green?
If no, try to activate.
If yes, check and reactivate
Question: is your macro working in interactive?
Thanks and Regards
Julien -
Hi BPC Friends
Until Yesterday I have executed without problem BPC Administration and BPC for excel.
Yesterday I have execute the package to load the data for a dimension (masterdata).
Now using my account I can open BPC Administration but If I try to execute BPC for excel, when I select an application the system give me this message:
object variable or with block variable not set
but if I execute the BPC for excel with another account It works.
Could you please help me?
thanks
regards
Michele Medagliathanks.
I have done the process but it doesn't work.
You said me:
if you imported a secure dimension then you have to process the security to have the right profiles for each user and member access profile. "
How Can I do this activity?
Why with another account I don't have this problem?
thanks
regards
Michele Medaglia -
Create a macro in Excel to capture Data from MS Project
We have a standard reporting tool which presents data in the format that our Head Office require. I currently copy/paste data from MS Project into the Excel spreadsheet however I would prefer to set up a macro in the Excel work to get the data from
the MS Project file however the macro only seems to pick up from the "paste" command.
Is it possible to set up a macro in Excel to copy data from MS Project?
M.L. PateYes, it is possible through VBA coding. Here is a simple:
http://stackoverflow.com/questions/9347874/how-to-copy-data-from-mpp-file-to-excel-using-macro
If you have programming/Code related questions, please post your question to the forum for Excel developer
http://social.msdn.microsoft.com/Forums/en-US/exceldev
Tony Chen
TechNet Community Support -
Using Macro in Excel How to open a SAP directly?
Hi,
Can Anyone Suggest and help me to do above Code in Excel,"Using Macro in Excel How to open SAP directly"
Example: I want to Open T.CODE: MM01 directly, without login in to SAP, Using Macro, i want to open SAP Directly, Anyone Suggest me how to do it?.............
I Tried this But it showing Run time Error'438', Object does not support this property or method........
VBCODE:
Dim sap As Object
Dim conn As Object
Sub T_login()
Set sap = CreateObject("SAP.Functions")
Set conn = sap.Connection
conn.System = "production"
conn.client = "800"
conn.user = "SAPUSER"
conn.Password = "123456"
conn.Language = ""
conn.Tcode = "MM01"
If conn.logon(0, False) Then
MsgBox "Logon to the SAP system is not possible", vbOKOnly, "Comment"
Else
End If
If Not IsObject(SapGuiApp) Then
Set SapGuiApp = CreateObject("Sapgui.ScriptingCtrl.1")
End If
If Not IsObject(Connection) Then
Set Connection = SapGuiApp.OpenConnection("production", True)
End If
If Not IsObject(session) Then
Set session = Connection.Children(0)
End If
session.findById("wnd[0]/usr/txtRSYST-MANDT").Text = "CLIENT"
session.findById("wnd[0]/usr/txtRSYST-BNAME").Text = "USER"
session.findById("wnd[0]/usr/pwdRSYST-BCODE").Text = "PASSWORD"
session.findById("wnd[0]/usr/txtRSYST-LANGU").Text = ""
session.findById("wnd[0]/usr/txtRSYST-LANGU").SetFocus
session.findById("wnd[0]/usr/txtRSYST-LANGU").caretPosition = 2
session.findById("wnd[0]").sendVKey 0
Set wshell = CreateObject("Wscript.Shell")
wshell.Run Chr(34) & Path & "\script.vbs" & Chr(34), 1, 1
End Sub
Anyone send me the Exact code related to this.................
Its very immediate requirement.................
Regards
KarthickHi Karthick,
You could try the following:
Sub Test()
If Not IsObject(SAPguiApp) Then
Set SAPguiApp = CreateObject("Sapgui.ScriptingCtrl.1")
End If
If Not IsObject(Connection) Then
Set Connection = SAPguiApp.OpenConnection("SYSTEMNAME", True)
End If
If Not IsObject(session) Then
Set session = Connection.Children(0)
End If
session.findById("wnd[0]/usr/txtRSYST-MANDT").Text = "123"
session.findById("wnd[0]/usr/txtRSYST-BNAME").Text = "USER"
session.findById("wnd[0]/usr/pwdRSYST-BCODE").Text = "PASSWORD"
session.findById("wnd[0]/usr/txtRSYST-LANGU").Text = "EN"
session.findById("wnd[0]/usr/txtRSYST-LANGU").SetFocus
session.findById("wnd[0]/usr/txtRSYST-LANGU").caretPosition = 2
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/tbar[0]/okcd").Text = "/nmm01"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]").maximize
MsgBox "If you click on the OK button, the SAP session is terminated."
End Sub
SAP GUI should appear in the new design, you must do the following:
START -> All Programs -> SAP Front End -> SAP GUI Configuration -> Application -> Add -> excel.exe -> Open
If the program is started from a VBS file, it must be entered here wscript.exe.
Regards,
ScriptMan -
Error while executing procedure for excel upload
Hi Friends
Pl. find below error while executing procedure for loading excel data. pl. verify and suggest for any changes in the format of data.
Rgds
SriGIf reading Excel as a database you would use "Access LSLINK"
Access external means you are reading a file. I don't think it is possible to treat Excel as a file because the internal structure is complex.
In the past I have saved the Excel as a CSV or as a Tab delimeted file. Then I use something like
ACCESS External
USE &filename
BEGIN
DESCRIPTION free ,
Variables text 20
Organisation text 20
'July 2008' numeric 20
'August 2008' numeric 20
'September 2008' numeric 20
'October 2008' numeric 20
'November 2008' numeric 20
'December 2008' numeric 20
'January 2009' numeric 20
'February 2009' numeric 20
'March 2009' numeric 20
'April 2009' numeric 20
'May 2009' numeric 20
'June 2009' numeric 20
END
peek
read
... quit the access sub system
END -
How to save macros in excel for all workbooks permanently?
HI all,
I have created macros in the Excel 2007 and have saved it. And its working fine. But i open the same excel sheet again, I cant see any macros in the excel sheet?
Can anyone pls let me know how to save the macros permanently in the Excel Sheet ?
Thanks
PoojaHi ,
I have saved as .xslx format but still the same unable to see the macros in the same excel sheet.
My intention is that when ever i open any excel sheet in the my computer those macros should be available for me!!
Thanks
Pooja -
Compatibility of macros in Excel 2010
Hi
I have some excel 2007 files (having some macros) and want to use them in excel 2010. I want to open those excel 2007 files in excel 2010. Does my macros works in excel 2010.
Can you please send some support documents.
Regards
AbhileshHi
Thank you for using
Microsoft Office for IT Professionals Forums.
For backward compatibility with earlier versions of Excel, such as Excel 97-2003 or Excel 2007, you can use one of several ways to exchange workbooks between
the different versions.
Work in Compatibility Mode You can open a workbook that was created
in an earlier version of Excel and work in Compatibility Mode so that the workbook remains in a file format that can easily be opened again in the earlier version. Compatibility mode is not available for Excel 2007 workbooks.
Download file converters You can use file converters that you
can download to open an Excel 2010 workbook in an earlier version of Excel.
Check a workbook for compatibility If you want to work in the
current file format but have to share a workbook with people who use earlier versions of Excel, you can check that the data is compatible with earlier versions of Excel. You can then make the necessary changes to avoid the loss of data or fidelity that might
occur when that workbook is opened in an earlier version of Excel.
More detailed information you can refer to this article: Use Excel Starter 2010 with earlier versions of Excel
http://office.microsoft.com/en-us/starter-help/use-excel-starter-2010-with-earlier-versions-of-excel-HA010387550.aspx?CTT=1
Additional, you can read this article to learn more: Application Compatibility for Microsoft Office 2010
http://blogs.technet.com/b/ptsblog/archive/2011/02/10/application-compatibility-for-microsoft-office-2010.aspx
All compatibility areas are getting addressed by the full set of tools and programs:
Feature-function change → Compatibility Inspector
ISV applications → OEAT
Add-in compatibility → OEAT
Maintenance/migration of macros → Compatibility Inspector
Maintenance/migration of scripts → Compatibility Inspector
Document fidelity → OMPM
Microsoft Office Code Compatibility Inspector user's guide
http://technet.microsoft.com/en-us/library/ee833946.aspx
Download:
Office 2010 Tool: Compatibility Inspector
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=23c8a7f6-88b3-48ef-9710-9742340562c0&displaylang=en
Changes in Excel 2010
http://technet.microsoft.com/en-us/library/cc179167.aspx
Please take your time to try the suggestions and let me know the results at your earliest convenience. If anything is unclear or if there is anything
I can do for you, please feel free to let me know.
Hope that helps.
Sincerely
William Zhou CHNPlease remember to mark the replies as answers if they help and unmark them if they provide no help. -
Error when I execute a report - Excel 2007
BW 3.5
SAPGUI 7.10
Patch level 3
Excel 2007
When any query is executed in this machine this error is showed:
<internal error> Problem when writing table: C_T_VARIABLES
These are the other tables in the other messages:
E_T_DIM
E_T_ATR
E_T_PRPTYS
C_T_HRY_TYPES
E_T_CEL
E_T_FAC
Thanks,This is the solution.
Re: Shared Workbook - Issue Problem when writing table C_T_VARIABLES -
hi
i am able to pass data in excel.
now for this data ,i have created a macro which create a
graph as result.
problem is how to call this macro in web dynpro.
please help me this.Hallo Jagannatha,
the new table feature is available in SAP NetWeaver 7.0 EhP2 (SAP ERP 6.0 EhP5, SAP Business Suite 7i2010) named 'TableMultiEditorCell'. See [SAP Online Help|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/9b/46bb0d339b42cc8d30636ca0c9f5b6/frameset.htm] for more details ...
"This UI element is a table cell variant that enables several UI elements to be placed in one table cell. This type of cell can be used for "one click actions". ...
Regards, Bertram
Maybe you are looking for
-
Video won't launch until player has been refreshed in Captivate 5.5
I'm encountering a really strang issue. I have a training that is mostly slide video, divided over about 6 slides (video is roughly 5 minutes long, resolution 480x360). When I launch the project, the project will play but the video won't. Then, i
-
Acquire data from a tab delimited file using a popup dialog object on a stamp
I am trying to import data from a tab delimited file using a popup dialog object on a stamp. I have purchased the book by Thom Parker--All About PDF Stamps in Acrobat and Paperless Workflows and have been working through the examples in the appendix
-
Sound going out on the wrong end
I use a Pavilion dm4-2095. Even when I have my headphones some program's sounds go out trought the notebook, not thought the headphone, skype for example. How can i fix this?
-
Hi, I'm trying to run a program using JCOM from the command line. My program is a test runner which spawns a number of users in separate threads and runs a sequence of requests. For every new user, the constructor which initializes the jcom proxy obj
-
I have turned two computers on to home sharing. I am now on this computer wanting to put my music on to this itunes and i know i need to find the other computer in the drop down menu from " Home Sharing " but that menu isnt there on the left?