Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Excel Macros


  • Please log in to reply

#1
The Josh

The Josh

    New Member

  • Member
  • Pip
  • 3 posts
Only recently started working with macros, can do all the basic usual stuff like inserting data, changing data etc, but is there a way to design a macro, where when i click it a box pops up asking questions about what data to input? For example, I click the button, a window pops up, it asks what time i started a job, what time i finished, when i had breaks and what rate i was getting paid for it, then calculates how much i get paid and displays it in a cell?
Thanks in advance
  • 0

Advertisements


#2
TomWij

TomWij

    Member

  • Member
  • PipPipPip
  • 125 posts
This should be possible by using Visual Basic for Excel, here are some links that will help you:

- VBA For Excel (You can go to the next page at the bottom, the link is kinda small)
- VBSript InputBox (To request information)
  • 0

#3
Ax238

Ax238

    Tech Staff

  • Technician
  • 1,323 posts
You can use an InputBox to ask specific information, just search help in VBA for the syntax. With this approach though, you'd have to have an input box for every piece of information you want to put in the cells, unless you concatenate all the values together. The only other method is to create a UserForm. In the Visual Basic Editor window (Alt-F11 when you open Excel), choose Insert | UserForm. After that, it's just a matter of putting the input controls, labels, and buttons on the form and adding the code-behind.

Let me know if you need any more help.

Ax
  • 0

#4
The Josh

The Josh

    New Member

  • Topic Starter
  • Member
  • Pip
  • 3 posts
Cheers, you really helped a lot, however

After that, it's just a matter of putting the input controls, labels, and buttons on the form and adding the code-behind.


You know where there's a list of the code-behind for me to use?

Thanks again
Josh
  • 0

#5
Ax238

Ax238

    Tech Staff

  • Technician
  • 1,323 posts
Josh,

The following link may give you a good start:
http://www.contextur...UserForm01.html

Regards,

Ax
  • 0

#6
The Josh

The Josh

    New Member

  • Topic Starter
  • Member
  • Pip
  • 3 posts
You're a star, cheers dude
  • 0

#7
Ax238

Ax238

    Tech Staff

  • Technician
  • 1,323 posts
:) No problem at all.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP