Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Reading a textbox ole/control

I'm trying to read and write text to all textboxes on a worksheet page. I
pulled off of a bunch of examples from this forum (including one of my own
threads) and nothing is working. Can someone verify if there is something
wrong with either of these methods below.
Note that at this point in the code the worksheet is open and I've already
read from objWS.cells. The page has two text boxes and two picture boxes, I
don't know if they are OLE or controls. Neither method executes the loop at
all. I'm using Excel 2003 and Windows 2000.

Method 1, read an OLE textbox:

For Each OLEObj In objWS.OLEObjects
BBStr = OLEObj.Object.Text
oIEDoc.Writeln BBStr
Next

Method 2, read a textbox control:

For K = 1 To 5
BBStr = ActiveSheet.Controls("TextBox" & K).Text
oIEDoc.Writeln BBStr
Next

Reply
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
Textbox control Brad Excel Programming 3 November 8th 07 08:59 PM
How to move cursor from one textbox control to another textbox con Tom Ogilvy Excel Programming 1 September 16th 04 03:42 PM
How to move cursor from one textbox control to another textbox con KMoore007 Excel Programming 0 September 16th 04 02:47 PM
Set Focus Problem for textbox control on multipage control ExcelDeveloperSPR Excel Programming 1 July 16th 04 08:54 PM
Reading from TextBox Shashi Bhosale Excel Programming 2 June 23rd 04 01:31 PM


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

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

About Us

"It's about Microsoft Excel"