VBA and Excel
-
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
-
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
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
-
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
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
-
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
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