Cell contents vs. Formula Bar contents

Lamar in Houston

Board Regular
Joined
Jan 21, 2006
Messages
72
I have a VBA code that copies the value of the active cell. The value in the clipboard buffer is then pasted (Manually by the user) into another application. This all works fine for one application but in another it does not.

Here is where it gets puzzling: If I highlight the value in the Formula Bar then select 'Copy' it will paste into the other app with no problem. But if the cell containing the value is copied it will paste into a text editor, another cell etc, but not into the other application.



Any Ideas??

Thanks in advance
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I suppose that the "other" application does not recognize the format on the clipboard. It is not always "straight text" when copying from a range. There are better ways of transferring data to other applications if you wish to discuss that here.
 
Upvote 0
Any ideas are welcome. The text will not paste into an application called "TabWare" which is a CMMS system. I do not know much about it as to it's platform etc.

I can copy the text in Excel, paste it into WordPad for example, then copy from WordPad to Tabware. But I cannot go direct unless the text in the formula bar is copied. I have not been able to automate doing that.

Thanks for the response.
 
Upvote 0
Lamar

Is your data transfer from Excel to Tabware a very repetitive task or something done occasionally?

Option 1.
Edit the macro to copy the text from the formula bar (for some range such as the activecell or multiple ranges) to the clipboard instead of the displayed text in the cell.

Option 2.
Edit the macro to do the above, but, instead of sending the data to the clipboard, send it directly to Tabware. This option will require a bit of investigation on your part. If this process of copying and pasting and the time and effort involved could be greatly reduced by simply running code that takes a range of cells as an argument, then it may be worth your time.
 
Upvote 0
It is done by the users frequently - 25 to 50 times a day, but under a time constraint of a sort. Presently the number is 'remembered' from Excel then typed into Tabware. Note that they could highlight & copy from the formula bar, but this is rather clumsey.

Option 1 is what I am trying to do but have failed at it with macro code.

I have tried copying the cell contents, value, text etc but all fail. What do you suggest for copying the contents of the formula bar?

Thanks,

Lamar
 
Upvote 0
<table border="1" bgcolor="White"><caption ALIGN=left><font size="2" face=Courier New>Example VBA Code:</FONT></caption><tr><td><font size="2" face=Courier New>  <font color="#008000">'add a reference to Microsoft Forms 2.X Object Library</font>
  <font color="#0000A0">Sub</font> TryThisFirst()
       <font color="#0000A0">Dim</font> DatObj <font color="#0000A0">As</font> <font color="#0000A0">New</font> DataObject
       DatObj.SetText ActiveCell.Text
       DatObj.PutInClipboard
  <font color="#0000A0">End</font> <font color="#0000A0">Sub</font>
</FONT></td></tr></table>
 
Upvote 0
Thanks. I will try this out when I get back into the office. It works with everything else I have tried so I am optomistic!

I'll let you know if it works soon.

Lamar
 
Upvote 0
Tom - that did the trick! It works great and will save us a lot of time and keyboard enty.

And I learned something new and useful...

Many thanks

Lamar
 
Upvote 0

Forum statistics

Threads
1,224,531
Messages
6,179,380
Members
452,907
Latest member
Roland Deschain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top