VBA Structure Day 2

VBA Structure Day 2 - o Range(A2).Value = Last Do the same...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
VBA Structure Day 2 Developer Tab, Visual Basic Icon o Opens up visual basic editor To make a variable write Dim VariableName As DataType o I.E. Dim Last As String o Dim First As String Use input boxes to obtain the necessary data o Prompt is the only required argument when making an input box ‘Use input boxes to obtain employee info o Range(“C2”).Value = InputBox(“Please provide the employee’s title.”) To store the last name set cell A2 = last
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: o Range(A2).Value = Last Do the same for first You can not have a worksheet with the same name as the one you used in your VBA code or you will get an error message Select Case Pay Rate o Case 1 >= 30 Use highest tax rate o Case 2 >= 10 Use medium tax rate o Case Else Use lowest tax rate o End Select o In VBA for each of these cases we are going to tell it what we want it to do...
View Full Document

This note was uploaded on 11/20/2011 for the course ACIS 2504 taught by Professor Mtgriffin during the Fall '08 term at Virginia Tech.

Ask a homework question - tutors are online