Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
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