|
-
Jan 8th, 2006, 03:59 PM
#1
Thread Starter
Junior Member
Reference textbox data from excel function
I have created textbox1 on an excel spreadsheet and placed a number in it. I have written a function to get that number into an excel cell:
Public Function GetValue(Obj as Object)
Dim x as String
x = Obj.Value
GetValue = x
End Function
then in excel cell I call function:
=GetValue(TextBox1)
I can't get this work and feel I must be missing something pretty basic. It would be very valuable to be able to place data in textboxes, comboxes, etc. and then reference that data in excel functions for use use in excel formulas.
Regards, Dennis
-
Jan 8th, 2006, 04:00 PM
#2
Re: Reference textbox data from excel function
Are you doing this only in Excels VBA or automating Excel from VB 6?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 8th, 2006, 05:10 PM
#3
Thread Starter
Junior Member
Re: Reference textbox data from excel function
I am doing this in excel vba - 1) Open excel and create textbox 2) Switch (Alt+F11) to VBA and write function 3)Switch back (Alt+F11) to excel sheet and try to use function. I can access contains via a Sub procedure and write to excel cell. The funtion would be much more powerful. Regards, dencur
-
Jan 9th, 2006, 07:31 AM
#4
Re: Reference textbox data from excel function
Moved to Office Development.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|