Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4626778
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:28:12+00:00 2026-05-22T03:28:12+00:00

I have got an assignment in VBA where I have to convert an existing

  • 0

I have got an assignment in VBA where I have to convert an existing table’s rows to colums, but I only have to show two rows from the table and all that has to be done with the help of an ActiveX control button. I also have to change the table cells values to Euros and back to Estonian Kroons with the help of a button. Thirdly, I have to find a value and the price of it according to the new table.

I have already written the code as much as I could, but it does not work correctly. There are a few problems: a)firstly, after pressing the solving button it does not give all the values in the new table, b)secondly, when I try to use the currency changing buttons Euros/Kroons, it multiplies my values infinitely and thirdly I do not get a right answer when I have to find the cheapest SMS package name and the price of it.

I guess my explanation was very messy, so I am adding the Excel file that can be seen here: http://www.2shared.com/file/awEG5hf-/KT_online.html

The code is really long, so I don’t want to add it here, but the image from the assignment looks like this: enter image description here that image shows the correct solution of the assignment.

I really, really appreciate it if someone could find time to help me. A huge thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T03:28:13+00:00Added an answer on May 22, 2026 at 3:28 am

    Try changing the following subs

    SHEET1

    Private Sub CommandButton1_Click()
        If Sheet1.Range("E6").Value = "Prices in Euros" Or Sheet1.Range("E6").Value = ""    Then eek
    End Sub
    
    Private Sub CommandButton2_Click()
        If Sheet1.Range("E6").Value = "Prices in Kroons" Or Sheet1.Range("E6").Value = "" Then eur
    End Sub
    
    Private Sub CommandButton3_Click()
        lahenda
    End Sub
    

    MODULE1

    Sub lahenda()
    
    With Sheet1
        .Range("B8:B16,F8:F16").Copy
        .Range("B18:J19").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=True
        .Range("C23").Formula = "=MIN(H9:H16)"
        .Range("C24").Formula = "=INDEX(B9:B16,MATCH(minhind,H9:H16,0),1)"
    End With
    
    End Sub
    

    MODULE2

    Sub eur()
        Dim prk As Range, hinnad As Range, koht1
        Dim n, m
        Set prk = Range("alg").CurrentRegion
        n = prk.Rows.Count - 1
        m = prk.Columns.Count - 1
        Set hinnad = prk.Offset(1, 1).Resize(n, m)
    
        Set koht1 = prk.Cells(2, 2)
    
        ReDim a(1 To n, 1 To m), paketid(1 To n), naitajad(1 To m)
        ReDim veerg(1 To n), rida(1 To m)
        ReDim b(1 To n, 1 To m)
    
        a = hinnad
    
        kurss = Range("kurss")
        tee_tabel a(), n, m, b(), kurss
        tabel_lehele b(), n, m, koht1
     Sheet1.Range("E6").Value = "Prices in Euros"
    End Sub
    

    MODULE3

    Sub eek()
        Dim prk As Range, hinnad As Range, koht1 As Range
        Dim n, m
        Set prk = Range("alg").CurrentRegion
        n = prk.Rows.Count - 1
        m = prk.Columns.Count - 1
        Set hinnad = prk.Offset(1, 1).Resize(n, m)
    
        Set koht1 = prk.Cells(2, 2)
    
        ReDim a(1 To n, 1 To m), paketid(1 To n), naitajad(1 To m)
        ReDim veerg(1 To n), rida(1 To m)
        ReDim b(1 To n, 1 To m)
    
        a = hinnad
    
        kurss = Range("kurss")
        tee_tabel a(), n, m, b(), kurss
        tabel_lehele b(), n, m, koht1
     Sheet1.Range("E6").Value = "Prices in Kroons"
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a homework assignment where I have a base class Package, and two
I have got some code to load an assembly and get all types, which
I have got the following code from here to read an Excel file using
I have got a assignment to develop a IPhone application in HTML 5 &
I have got this read file code from microsoft @C:\Users\computing\Documents\mikec\assignment2\task_2.txt That works fine when
I have an assignment and i got a library including an interface class. [InfoItem]
I've got two entities, one called Site and the other called Assignment. A Site
I'm just learning about C and got an assignment where we have to translate
I have an assignment problem that i can't manage to fix and got totally
I got an assignment where I have to implement a custom call forwarding system

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.