LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Get / extract a button name

The problem is much greater:
I have a field C2 ").
With a click on a button, Outlook generates an email with Body, Subject,
Attachment and Signatur. But I want that the email-Adress for the To-Field is
taken from C2.

Therefore I thought, that I can provide this field dynamic, so that VBA
takes the Name of the Button (in this Case C2) and after that it chooses the
field C2, lookes inside, takes the adress in C2 and puts it in the To-Field!

Do I want to much?
I know everything about that process but now idea how to query the the name
of the button in that button.

So I hope someone can help me.

"ben" wrote:

You want to get the name without using the name???? Sorry not quite certain
what you are asking for.
you could loop through all the controls on the userform and see if any of
them match criteria
dim con as control
for each con in me.controls
if 'criteria code here
whatiwant = con.name
end if
next

ben

"Oener" wrote:

Hi,

I have a button "C2".
I want to get the name of the button in VBA to point on the cell C2.
How do I get the name of the button without using the name of the button?

With use:
Dim whatIwant as variant
whatIwant = Me.C2.Name
-- whatIwant=C2

is there a way like:
whatIwant = Mebutton.Name
???

Kindly
Oener

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Macro Button to Extract Data william4444 New Users to Excel 2 July 4th 06 04:38 AM
Creating a Macro Button to Extract Data william4444 Excel Discussion (Misc queries) 1 July 3rd 06 02:04 PM
Creating a Macro Button to Extract Data william4444 New Users to Excel 0 June 22nd 06 02:53 AM
Extract Unique Values, Then Extract Again to Remove Suffixes Karl Burrows Excel Discussion (Misc queries) 23 June 25th 05 10:37 PM
Extract image from toolbar button jamieuk Excel Programming 1 January 16th 04 03:23 PM


All times are GMT +1. The time now is 10:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"