Anthony's VBA Forum Index Anthony's VBA Forum
Where the knowledge is shared
Menu
 Anthony's VBA Forum IndexHome Page
 Anthony's VBA Forum IndexForum Index
FAQFAQ
MemberlistMemberlist
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesMessages
Log inLogin/Out

Quick Search

Advanced Search

Links
Consulting
Products

Who's Online
[ Administrator ]
[ Moderator ]


How to access textbox values from excel function

 
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA
View previous topic :: View next topic  
Author Message
dencur



Joined: 08 Jan 2006
Posts: 1

PostPosted: Sun Jan 08, 2006 4:21 pm    Post subject: How to access textbox values from excel function Reply with quote

I have created textbox1 on an excel spreadsheet and placed a number in it. I have created a function to try and get that number:

Public Function GetValue(obj as Object)
dim x as string

Getvalue = obj.value

End Function

Then in an excel cell:

=GetValue(TextBox1)

I can't get this to work, has anybody done this?

Smile
Back to top
View user's profile Send private message
Data
Moderator
Moderator


Joined: 06 Oct 2004
Posts: 33
Location: NY

PostPosted: Wed Feb 01, 2006 12:29 pm    Post subject: Reply with quote

To call the textbox value:

Use a similar code as the following:

Worksheets("Sheet1").TextBox1.Value
_________________
Data
Knowledge is Power
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group