• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Command to extract value

ganeshm

Member
HI Excel Experts,


Is it possible to extract values from one sheet to another if multiple command is given to command button?


link is given below


http://www.ozgrid.com/forum/showthread.php?t=176739&p=656042#post656042


regards,

ganesh
 
Hi Ganesh!!


* I like the way you provide detail in case of CROSS-POST.. but if someone willing to help you.. he also need to create/use his LOGIN on that site.. so Please don't give burden .. It will decrease your response time..

* I have download your file.. I have change all your ACTIVEX buttons to FORM button..

Please raise your hand if you need only ACTIVEX..

* Coy below CODE.. and paste in a separate module.

* assign the same macro to all the buttons..

[pre]
Code:
Sub LoadData()
Dim rng As Range
Sheets("Sheet1").Range("A4:D14").Clear
Set rng = Sheet2.Cells(1, 1).CurrentRegion
With rng
.AutoFilter 4, Sheets("Sheet1").Buttons(Application.Caller).Caption
.SpecialCells(12).Copy Sheets("Sheet1").Range("A4")
.AutoFilter
End With
End Sub
[/pre]

* Please take care regarding the NAME of the button.. its a vital point in above case..


https://dl.dropbox.com/u/78831150/Excel/Sheet%20to%20extract%20value%28ganeshm%29.xlsm


Regards,

Deb


PS:

Can someone help

  • How to get name of the object, which object calls a function/subroutine.. in case of ACTIVEX..
 
Deb,


You did the right thing by using Form Control buttons instead of ActiveX. See this article on Ozgrid:

http://www.ozgrid.com/VBA/excel-macro-determine-button.htm
 
Back
Top