VBA command for copying active cell content only

bhupender

New Member
Joined
Sep 24, 2013
Messages
17
Hello folks,
I tried the whole internet but couldnt find vba code for.
selecting active cell , then
f2 command, then
selecting all the content of the cell, then
copy all the content.

I have to enter a lot of data from excel to external application which support only values and not normal data copied from excel.

Please help, it looks easy, but doesnt have much knowledge of vba.

thanks
 
Yes, indeed I thought at first this is simple and a macro recorder will do the trick but as soon as I press F2 the recorder stop recording.

I thought sendkey command will do but I am not an expert on this subject.
 
Upvote 0

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
And your still saying if you run the script I gave you.

And then switch over to a application like Note Pad and then press "Ctrl+ V" which is the command for "Paste" you say nothing is pasted.
And you realize you said copy "Active cell" Not "Selection"

In your original post you said copy Active cell. That is only the contents of the active cell not the contents of a Range of cells.
 
Upvote 0
Exactly, nothing gets pasted in the application. by the way the application is MYOB which is an accounting application. I need to copy a cell where an invoice number is written. but if i simply copy (or even after using codes), it does copy the content but doesnt past it. on the other hand if I do F2+ select all+ copy then its got pasted.

So I was just looking for a code which can replicate these three keys which I am pressing to get the data copied from the active cell.

i hope I am clear in expressing what I want.

thanks
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,701
Members
448,980
Latest member
CarlosWin

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