View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
OJ[_2_] OJ[_2_] is offline
external usenet poster
 
Posts: 111
Default Get / Extract Data from an Excel Field

Oener,
Without wanting to sound harsh, your "english" is a touch difficult to
understand!! If you are looking fro the value held in Cell "C2" on the
worksheet then you need something like this...

address = ThisWorkbook.Sheets(1).Range("C2").Value

If you want the button's Caption Value (ie what it says on the button)
then you need..

For a Forms button..

ThisWorkbook.Sheets(1).Shapes("But3").Select
address = Selection.Characters.Text

For a Control button...
address = ThisWorkbook.Sheets(1).CommandButton1.Caption

Hth,
OJ