Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Copy from text box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Defoes Right Boot - 23 Jan 2006 09:25 GMT
I want to use a macro to copy data from a text box to a cell.

To copy the contents of TextBox10 on sheet "Customer Info" to cell B43 on
sheet "Answers" I have tried recording a macro whilst highlighting the text
and then manually copying it, but that doesn't work. I have also tried the
code :

Sheets("Answers").Select
Range("B43").Value=Worksheets("Customer Info).TextBox10.Text

which I found in another thread on this board.

but I get a run-time error '438' : object doesn't support this property or
method (on the second line of this.)

Anyone got any ideas???

Thanks

Phil
Bob Phillips - 23 Jan 2006 09:37 GMT
Phil,

Give this a whirl

Range("B43").Value=Worksheets("Customer
Info).OLEObjects("TextBox10").Object.Text

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

> I want to use a macro to copy data from a text box to a cell.
>
[quoted text clipped - 16 lines]
>
> Phil
Defoes Right Boot - 23 Jan 2006 10:26 GMT
Hi Bob

Unfortunately that doesn't work either, now it comes up with Run-Time error
'1004' : Unable to get the OLEObjects property of the Worksheet class.

Any further ideas? Or is something set up wrong somewhere on my computer?

Thanks

Phil

> Phil,
>
[quoted text clipped - 32 lines]
> >
> > Phil
Bob Phillips - 23 Jan 2006 13:42 GMT
Where did yuou get the textbox from in Excel?

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

> Hi Bob
>
[quoted text clipped - 43 lines]
> > >
> > > Phil
Defoes Right Boot - 23 Jan 2006 13:51 GMT
It was from the Drawing toolbar (at least I'm 99% sure it was...)

Would that make a difference?

> Where did yuou get the textbox from in Excel?
>
[quoted text clipped - 57 lines]
> > > >
> > > > Phil
Bob Phillips - 23 Jan 2006 14:32 GMT
Try this then

Range("B43").Value=Worksheets("Customer Info).TextBoxes("TextBox10").Text

make sure you get the name correct

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

> It was from the Drawing toolbar (at least I'm 99% sure it was...)
>
[quoted text clipped - 61 lines]
> > > > >
> > > > > Phil
Defoes Right Boot - 23 Jan 2006 14:52 GMT
OK now we get Run-time error 1004 : Unable to get the TextBoxes property of
the Worksheet class.

I'm starting to think I might do better simply using a cell rather than a
text box!! Are there any reasons why that might not be a good idea?

Phil

> Try this then
>
[quoted text clipped - 82 lines]
> > > > > >
> > > > > > Phil
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.