Solved: Macro help

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

runner77

Thread Starter
Joined
Jan 11, 2006
Messages
42
Hi Guys,

I have set up a dialog box (dialog1) to enable me to enter payroll data in to sheet called (Payroll Data) can any one tell we how a can get the dialog box to put the data into the correct column in the Payroll Data sheet do I need macros to do this. I also need to close, update and cancel the dialog box. Any help would be greatly appreciated.

Kind Regards
Runner77
 

Attachments

Joined
Jul 1, 2005
Messages
8,546
Welcome to TSG. Don't take offence -- are you seriously going to be using Excel version 5 for this?
 

runner77

Thread Starter
Joined
Jan 11, 2006
Messages
42
Bomb#21,

No offence taken mate, I am using Excel 2000? I think the Dialog box is a version 5?

Kind Regards
Runner77
 

runner77

Thread Starter
Joined
Jan 11, 2006
Messages
42
Bomb#21,

Yes I have, would like it done this way do you think it will be to hard.

Regards
Runner77
 
Joined
Jul 25, 2004
Messages
5,458
Why the Dialog sheet? Why not just use a userform? I'm a little lost as to what you are trying to do with your objects here. Can you explain a little more the reasoning behind this file?
 
Joined
Jul 1, 2005
Messages
8,546
While I totally take Zack's point, the nostalgia is overwhelming. Forex,

Range("A10").Value = Sheets("Dialog1").EditBoxes("Edit Box 9").Text

= yay! Except now I have a headache. :D
 

runner77

Thread Starter
Joined
Jan 11, 2006
Messages
42
firefytr,

I need to have the information which is to be entered in to the dialog box and have each box out the data in the payroll data sheet. e.g when i enter the persons first name in the first box i would like that name put in to Cell "B7" and so on for each employee. Hope this explians this clearly.

Regards
Runner77
 
Joined
Jul 1, 2005
Messages
8,546
Zack is simply saying that a userform would be better. A userform is the modern equivalent of a d-box and much more powerful. runner77, is this for someone who only has Excel 5?
 
Joined
Jul 1, 2005
Messages
8,546
OK then.

Some of the code methods I cribbed. ;) I've disabled "Employee ID" -- assuming it should be unique, it should be assigned programatically & sequentially.

The dropdown lists are built by code when the form is displayed. Technically, you could delete Sheet1 (and Dialog1, FWIW -- just hide them, if you prefer).

Personally I'd ditch the frames (which screw with Focus) for plain Labels. Post back if you need any tweaks.

Rgds,
Andy
 

Attachments

runner77

Thread Starter
Joined
Jan 11, 2006
Messages
42
Andy,

Sorry it took so long to reply just got in to work. Thank you so much for helping me set this up, I really appreciate your help. How can I see the code so I can see how you created it, as some of the divisions I made up just to get started, and can you tell me how I can enable the “Employee ID” as well. And the Last question how can i have the cursor when you click on new employee appare in the first box instead on the address line.

Once again thanks for all your help

Kind Regards
Mark
 
Joined
Jul 1, 2005
Messages
8,546
Viewing the code -- hit ALT+F11 to open the Visual Basic Editor (VBE). "Project Explorer" (a Windows Explorer-type directory thing for navigating VBA projects) may be visible on the left -- if not, hit CTRL+R to display. From there you should be able to click on the userform within the Forms folder and either "View Code" or "View Object" from the View menu.

Have a go at editing Private Sub UserForm_Initialize() for your divisions, then post back with how it went.
 

runner77

Thread Starter
Joined
Jan 11, 2006
Messages
42
Andy,

Thanks Mate Got it.

How do I get the form to tab in the correct order. and the moment is starts in the Address Line and jumps all over the place. Also after the Remuneration column I would like it to caculate the following formula (A7/109)*100 for each employee.

Regards
Mark
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top