LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 542
Default Set object with a function

Hello, Can I do something like this.....?
............
Dim MyTextBox as Textbox
TxtBoxNum = 3
Set MyTextBox = SetTheTextBoxFunc(TxtBoxNum)
............
Public Function SetTheTextBoxFunc(num as integer) as Textbox
select case num
case 1
SetTheTextBoxFunc = SLNX.Textbox1
case 2
SetTheTextBoxFunc = SLNX.Textbox2
case 3
SetTheTextBoxFunc = SLNX.Textbox3
end select
end function
...............
SLNX is a form with a bunch of textboxes. Thanks for any help. Cant quite
figure this out.
 
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
Return reference from object function [email protected] Excel Programming 3 July 10th 06 12:33 PM
Object doesn't support this property or method (Node Function) Ronster Excel Programming 1 June 14th 06 07:35 PM
Function for an object Mike Excel Worksheet Functions 1 March 30th 06 06:03 PM
How to write macro to move object via if function Ged Excel Discussion (Misc queries) 4 February 20th 06 12:34 AM
Function unable to return Collection object Adrian[_7_] Excel Programming 1 July 12th 04 06:22 PM


All times are GMT +1. The time now is 03:00 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"