Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Copy from text box

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Copy from text box

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)

"Defoes Right Boot" wrote in
message ...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Copy from text box

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

"Bob Phillips" wrote:

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)

"Defoes Right Boot" wrote in
message ...
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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Copy from text box

Where did yuou get the textbox from in Excel?

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Defoes Right Boot" wrote in
message ...
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

"Bob Phillips" wrote:

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)

"Defoes Right Boot" wrote in
message ...
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






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Copy from text box

It was from the Drawing toolbar (at least I'm 99% sure it was...)

Would that make a difference?

"Bob Phillips" wrote:

Where did yuou get the textbox from in Excel?

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Defoes Right Boot" wrote in
message ...
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

"Bob Phillips" wrote:

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)

"Defoes Right Boot" wrote in
message ...
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








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Copy from text box

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)

"Defoes Right Boot" wrote in
message ...
It was from the Drawing toolbar (at least I'm 99% sure it was...)

Would that make a difference?

"Bob Phillips" wrote:

Where did yuou get the textbox from in Excel?

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Defoes Right Boot" wrote in
message ...
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

"Bob Phillips" wrote:

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)

"Defoes Right Boot"

wrote in
message ...
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








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Copy from text box

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

"Bob Phillips" wrote:

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)

"Defoes Right Boot" wrote in
message ...
It was from the Drawing toolbar (at least I'm 99% sure it was...)

Would that make a difference?

"Bob Phillips" wrote:

Where did yuou get the textbox from in Excel?

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Defoes Right Boot" wrote in
message ...
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

"Bob Phillips" wrote:

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)

"Defoes Right Boot"

wrote in
message ...
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









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
text box insert in Excel - text box lines print on second copy Diana (Berry & Co) Excel Discussion (Misc queries) 0 July 26th 06 04:39 AM
Copy text from Ms Access record to Excel text box [email protected] Excel Programming 0 September 7th 05 05:27 PM
I want to link, not just copy,Word source text to a text box in Ex Carrie K Excel Worksheet Functions 0 August 12th 05 07:58 PM
Search for text, copy the number in front of text w0cyru01 Excel Programming 4 August 3rd 05 05:15 PM
open some txt files ,find text , copy the text before that to a single cell gus Excel Programming 2 July 11th 05 05:40 PM


All times are GMT +1. The time now is 06:58 AM.

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"