Call SAP Transaction ME33K with VBA Code. How? - vba

I am desperately looking for a code to call an agreement out of vba in ME33K in SAP.
I have the agreement number, so I want to this number to be called in ME33K and pop up the SAP GUI.
Is there a way to do it? Can someone provide a code?

You should be able to do that with VBS from SAP itself (and not with VBA from Excel):
Go to the script recdorder: ALT+F12 > "Script Recording and playback", press the recording (red) button
Perform all you actions: go to your YSD033 screen, pull the variant, run the report, save it in Excel, close transaction.
Then stop recording.
The script (a VBS program) will be saved in your default SAP directory (but you can change this location esaily).
To run the script either play it from SAP (ALT+F12, etc except that instead of recrding it, play it) or you can also run it from Windows (if SAP is open) by double clicking the vbs file.
Mario Rappi on Feb 26, 2010 7:18 PM
http://scn.sap.com/thread/1619517

Related

Write a log file using Powerpoint

My objective is to write a log file, once a user open a PPT file and Travers to different slides, system write this information in log file.
Till now I tried following solutions:
1. Create a Add-in (PPA) and attach it manually in PPT file.
2. Create a button on first slide and on click event call Auto-Open event.
But ultimately I want to implement a solution to install Add-in by making entry in REGISTRY.
I already read this great article http://www.pptfaq.com/FAQ00469_Add_-_install_an_addin_via_the_registry.htm
I work along with Abhishek on this. This addin is only available to the user logged in and loaded the addin via file->options->cutomize ribbon. But we want to make this addin machine specific so that we dont have to load the addin each time.
Thanks and Regards,
RS

Resume Opening Workbook After Addin Interrupts

I've written an Excel addin that periodically checks a remote repository for data updates, including a check when the addin loads at Excel start up (during the addin's Workbook_Open event). If new respository data is detected, the addin asks the user for permission to proceed with the update. If the user clicks "yes", the addin successfully updates itself and everything is happy... except...
If Excel is not already running and the user selects an Excel file to open (e.g. via double-click in Windows), this sequence of events occurs and everything works, but the user-requested file opening is interrupted and not re-engaged. The Excel app is running, but with no workbook loaded (the workbook area is an empty frame).
I believe I have two options, neither of which I know how to accomplish:
Prevent the addin from completing its update check until the user-selected file has completed its open sequence and is fully loaded, or
Allow the addin to update itself and then somehow re-engage the user-selected file to complete the file open/load.
I have not been able to discover the filename/path of the user-requested file, so my addin isn't able to direct that file to be loaded.
My current workaround is a MsgBox telling the user to close Excel and re-open the selected file. Ideally, the addin update should occur and the original action should complete without requiring user intervention.
(Building on Option 1, I could start a delay timer for the addin to check for updates XX number of seconds after Excel starts, but this seems kludgy to me.)
Any guidance or ideas are appreciated. My interwebz searches aren't hitting the right combination of keywords for the exact scenario.
Instead of opening the new addin update file immediately you can use OnTime to delay it which should allow the other file to open successfully. See here: Process for updating Excel add-in?
In the answer you'll also see a reference to this package here which does everything you need. Autoupdates are hard so I would recommend going with someone else's solution.
http://www.decisionmodels.com/downloads.htm#addload
(Scroll down to Add-In Loader Version 2)

Excel macro runs Access macro issue

I have an Excel macro that imports files into an Access database. The Excel macro uses a shell command to open Access and kick off a macro in the Access database. The Access macro runs an Access VBA function that runs several routines in Access. This works for me. I'm located in the US.
A UK user tries to run the Excel macro. Access opens but displays an error message. The Access database is located on the UK server.
I remoted in to the user's machine and opened the Access database. I then selected "macros" and pushed the "run macro" icon. A pop-up displayed and showed the macro name. You had to click "Ok" or "cancel". I've never seen this before and was wondering if this is the reason that the UK user gets the error message.
Any suggestions would be appreciated. thanks...........
Try going into the settings of his Access. If all fails, download and use this program called Express ClickYes. It automatically clicks yes when message boxes in Access pops up

Excel VBA to change internet explorer advanced settings

My current program that I am using, from excel, navigates to a web page where it downloads a lot of information. I primarily do this from excel because the data is in excel format.
I have it go to the page, click on a link and the open/save/cancel dialog box appears it automatically selects save and saves it to the last folder I saved anything in. Then it waits for the dialog box title to read "download complete" then close it and initiates the next download.
The issue I'm running in to, is that other people who use this program have the "close dialog box when download completes" option selected, and this interrupts the overall process.
Is there a way to change this setting from the excel VBA code, or will I need to explore a different method of dealing with this issue? Having the program do a direct download URL string is also not viable as the website needs to be logged in to and the request must come from the open window, (I have already attempted that method).
Use URLDownloadToFile to download from the internet, trying to use IE will lead to other issues:
VBA - URLDownloadToFile - Data missing in downloaded file

Run a VBA function every time 'Undo' is clicked

Is it possible to run a VBA function (Word 2007) every time the user clicks 'undo' (or crtl+z)? Thanks.
You can intercept most built-in commands in Word with VBA. See
Using VBA to Control Built-In Commands in the 2007 Office System.
Try intercepting the EditUndo command.