PDA

View Full Version : Running a macro on another spreadsheet with a macro



wildpianist
11-05-2007, 01:02 PM
Hello

I'm trying to do a spreadsheet that takes the figures from another spreadsheet.

The other spreadsheet that I need to access has a UserForm where I need to select different teams.

Is there a way to write a macro that will access the userform on another spreadsheet, select a value from the dropdown box and hit continue? Or is this too advanced for VBA?

Norie
11-05-2007, 01:06 PM
Why would you need to access the userform?

wildpianist
11-05-2007, 01:17 PM
Hello Norie

Our Spreadsheets are crap where I work all password protected where I want to access the code to see what lines I need to access and also I myself do not have access to Microsoft Access to view the database myself :(

The userform will I assume print a line of the database onto the spreadsheet that shows percentages of things (all top secret!) and the only way at the moment I can access this info is to click the specific name of the team from the drop down box and click continue, then wait about 15 seconds then it will populate all the data in percentages on the spreadsheet.

Its quite crap really

figment
11-05-2007, 01:29 PM
if you can find out what the objects on the form are called, then you can set there value in code, and call the macro that they would call. you will still have to wait the 20 some seconds that it takes to run, but it would remove the need for user input.

if you dont know the object names, then you could do something similare to http://vbaexpress.com/forum/showthread.php?t=15647 but other then that you best is to get the permitions you need.

wildpianist
11-05-2007, 01:36 PM
lol no chance with getting the permissions, they dont want us to have Access on too many computers as this will cost us too much money for the user licencing blah blah.

Is there a way to say view what is in the .mdb file in excel and then say point to all the stuff I need that way?

Thanks for your help

TonyJollans
11-05-2007, 01:57 PM
Frankly this is a ridiculous proposal and you should have a serious word with your manager. You making this work will cost far more than an Access licence - it probably has already.

wildpianist
11-05-2007, 02:03 PM
lol

it was only an idea to make peoples job easier lol

Saves them having to access a spreadsheet and writing some numbers down and then copying them to another spreadsheet. I know NOTHING about Access. I only had a quick go at SQL blach! I do see some code now and then in the immediate window which says SELECT * WHERE blah blah blah (goes right over my head!)

LOL :D

Bob Phillips
11-05-2007, 02:07 PM
Surely, if you have ways to make people's work simpler, more effective, and potentially cost-effective, it is your DUTY, part of your job, to make a proposal to your manager.

Management may not have asked you/told you to do that, but for cripes sake, take the initaitaive man! Just be positive, and do a proper job in compiling the numbers, and it should speak for iteslef. If it doesn't, you should be doing it. If it does, and management say no, you have directive (and documented evidence).

I just love hearing people bitch about management, how short-sighted they are, how out of touch they are, how they never do the right thing; and when you ask these peopl if they have ever made a suggestion to improve matters, they say'... no, they (management) don't want to hear/wouldn't listen ...'.

figment
11-05-2007, 02:08 PM
using data->importexternaldata, you can bring in a .mbd file its a bit messy but it can be done

Norie
11-05-2007, 02:23 PM
wildpianist

Where exactly did you mention anything about Access in your original post?:huh:

wildpianist
11-05-2007, 02:23 PM
lol we love xld!

wildpianist
11-05-2007, 02:27 PM
they wont even give me external email access.... lol.
...

Bob Phillips
11-05-2007, 02:38 PM
Do you need it to do your job? Will it be cost-effective for the company to give you that?

TonyJollans
11-05-2007, 03:04 PM
lol we love xld!

I offer the above quote just as an example. You come here with a hare-brained scheme, which you can't do on your own. You ask for help and you seem to resent it when it's offered. You are dismissive of the software available to you (SQL, for example) and have an attitude to your employers and their systems in a public forum.

Would I employ you? Not a chance.

Can I help you? Yes.

Will I help you? No.

I'm outta here!

wildpianist
11-05-2007, 03:54 PM
chin up