Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

someone has been answered #1, but I still need #2!!! The following is the link of question and answer of question 1! https://www.chegg.com/homework-help/questions-and-answers/1-create-vba-subroutine-namedaccountinformation1-declares-following-types-variables-intege-q23987196 Sub AccountInformation1()

someone has been answered #1, but I still need #2!!!

image text in transcribed

The following is the link of question and answer of question 1!

https://www.chegg.com/homework-help/questions-and-answers/1-create-vba-subroutine-namedaccountinformation1-declares-following-types-variables-intege-q23987196

Sub AccountInformation1()

'1a 'Declare variables

Dim integer_type As Integer Dim flag As String Dim ip As Long Dim a(0 To 5) As Integer Dim ip1 As Double Dim wb As Workbook: Set wb = ThisWorkbook Dim ws As Worksheet

'Dim ws As Worksheet Dim eg As Range Dim range_test As Range Dim b As Variant

'Ask for user_input

Dim user_input As Variant

user_input = InputBox("Enter either account number,account-name,number of withdrawls allowed or balance")

'Initialize variables

integer_type = 1 flag = "abc" ip = 1147483647 a(0) = 1 a(1) = 2 ip1 = 3.3333333 Set ws = wb.Sheets("Sheet1") Set eg = ws.Range("A1:A5") Set range_test = ws.Range("A1") b = Array(1, "a") ' Display varaiables

MsgBox "Integer " & integer_type MsgBox "Flag " & flag MsgBox "Long " & ip MsgBox "Array " & a(0) & " ," & a(1) MsgBox "Double " & ip1 MsgBox "Worksheet " & ws.Name MsgBox "Range " & eg.Value MsgBox "Cell" & range_test.Value MsgBox "Variant" & b End Sub

1. Create a VBA subroutine namedAccountinformation1 that: declares each of the following types of variables: Integer, String, Long, Array, Double, Worksheet, Range, Cell, and a variable that can store any data-type. declares a variable for a user-defined (complex) data-type that can contain the following a. b. customer's bank account number, account-name, number of withdrawals allowed, and balance. i. c. assigns a value to each of the variables declared in (a) d. displays the name of each variable in (a) and the value assigned. 2. Create a VBA subroutine Accountinformation2 Perform steps (1a.) and (1b.) in subroutine Accountinformation2, similar to what you did in Accountinformation1. Enhance subroutine Accountinformation2 to do the following a. b. i. Prompt the users for the current-interest-rate. [Check the textbook and the class examples for the syntax on how to prompt/request user-input] ii. Compute the interest-earned on the account as: balance current-interest-rate. Display the account-number, account-name, balance, current-interest-rate, and the interest-earned. Each piece of information you display must be on separate line (Use only ONE MsgBox command if possible. Remember the vbTab, and vbNewLine built-ins) After step (c), display a question: "Do you want to see more transactions?" [Your display should give the user options to click Yes', 'No', or 'Cancel' in response to the question c. d

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions

Question

=+1 What would you do if you were the IHR manager?

Answered: 1 week ago