cancel
Showing results for 
Search instead for 
Did you mean: 

Hide SAP window while running vba script.

Former Member
0 Kudos

Hey all

I'm sorry to ask but i cant find ths answer...

When i run a script in vba the window takes over when obtaining data from SAP ( client records in 'pa20')

For a couples its fine but when doing a lot i could being doing another task or looking on eBay

Can you set the window to stay minimised when running or at least if its runs into an error to show the window ?

Thanks

Pav.

Accepted Solutions (1)

Accepted Solutions (1)

paul_gendreau
Contributor
0 Kudos

Hello Pavle:

As far as I know, VBA in an Office application does not support multithreading, which would be the ideal approach.

In fact, this weekend I am updating code that does exactly as above (transfers tables of data from an SAP system to a local file or Access database) in a background process, using a BackgroundWorker. This approach means that the application's user interface is not stopped while SAP components transfer data; a user can continue to perform other activities with the application while the data transfers from SAP.

Of course, all this is done using Visual Studio .NET and not VBA.    It's one of several reasons that I abandoned VBA two years ago for this particular application.

- Paul

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

Paul R Gendreau, Jr.

SAP Retail

Former Member
0 Kudos

Thanks Mate!

I was looking at going to VS and this is the push I needed I guess

when you get rolling, can you show me examples of how to do it... if not its ok i understand

I have already started researching BackGroundWorker options

thanks for letting me know where to start

Pav.

Former Member
0 Kudos

Hey Paul, how did you go with your background worker?

paul_gendreau
Contributor
0 Kudos

BackgroundWorker is working fine.  Keep in mind that this is just an enhancement for an already robust process.  I had already created a class with many features as a wrapper for the process of downloading data from an SAP system.

There are many examples to use as a concept for getting started ... such as

http://scn.sap.com/docs/DOC-45293

- Paul

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

Paul R Gendreau, Jr.

SAP Retail

Answers (0)