Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. VBA and Excel

VBA and Excel

Scheduled Pinned Locked Moved Visual Basic
saleshelptutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    veon cheng
    wrote on last edited by
    #1

    hi everybody i really need you guys to help me on it, i'm new to VBA know nuts about it. currently i'm doing a project using excel and macro. For example i got a spreadsheet which acts like a data its something like this Site   service package        price A     1                                   78 A     1                                   78 A     2                                   128 B     3                                   175 B     1                                    78 C     3                                    175 C     2                                   128 then from another spreadsheet there is a button to generate them to Site     Total service     Total sales A     3                       284 B     2                       253 C     2                       303 So how do you loop through the spreadsheet and become something like this?? besides that how do you run the form(created in VBA) when u click on one of the button you created? Thanks Veon

    D 1 Reply Last reply
    0
    • V veon cheng

      hi everybody i really need you guys to help me on it, i'm new to VBA know nuts about it. currently i'm doing a project using excel and macro. For example i got a spreadsheet which acts like a data its something like this Site   service package        price A     1                                   78 A     1                                   78 A     2                                   128 B     3                                   175 B     1                                    78 C     3                                    175 C     2                                   128 then from another spreadsheet there is a button to generate them to Site     Total service     Total sales A     3                       284 B     2                       253 C     2                       303 So how do you loop through the spreadsheet and become something like this?? besides that how do you run the form(created in VBA) when u click on one of the button you created? Thanks Veon

      D Offline
      D Offline
      Dalek Dave
      wrote on last edited by
      #2

      To answer the second question first, write a macro to do the job, then insert a button, assign the macro to the button. Assuming you are running Excel in Office 2007, you click Insert, Shapes, [A Shape of your choice], Draw the shape where you want it to be, Right Click, Assign Macro. As to the macro itself, I need to have a think and will come back to you, but it is fairly simple I think.

      ------------------------------------ "When Belly Full, Chin Hit Chest" Confucius 502BC

      V 1 Reply Last reply
      0
      • D Dalek Dave

        To answer the second question first, write a macro to do the job, then insert a button, assign the macro to the button. Assuming you are running Excel in Office 2007, you click Insert, Shapes, [A Shape of your choice], Draw the shape where you want it to be, Right Click, Assign Macro. As to the macro itself, I need to have a think and will come back to you, but it is fairly simple I think.

        ------------------------------------ "When Belly Full, Chin Hit Chest" Confucius 502BC

        V Offline
        V Offline
        veon cheng
        wrote on last edited by
        #3

        hi thanks for reply =) just that i want a button that i created, and when it is being clicked it would run the Userform that i have created in VBA. its Userform not spreadsheet so sorry thanks veon

        D 1 Reply Last reply
        0
        • V veon cheng

          hi thanks for reply =) just that i want a button that i created, and when it is being clicked it would run the Userform that i have created in VBA. its Userform not spreadsheet so sorry thanks veon

          D Offline
          D Offline
          Dalek Dave
          wrote on last edited by
          #4

          Design the button you require, save it (as a gif say), then Insert Picture and assign a macro to the picture. The macro would be... Sub Macro1 Form1.Show End Where Form1 was your form to call.

          ------------------------------------ "When Belly Full, Chin Hit Chest" Confucius 502BC

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups