Can't Copy and Paste generated password, to encrypt Workbook

ViniTaylor

New Member
Joined
Mar 22, 2016
Messages
2
Thanks for taking the time to read this thread, I am new to the site and although I have searched on here, I can't find an answer to my question.

I have a 'Formula Generator' in excel that generates a 14 digit Password in a cell. I want to be able to copy this directly from Excel and paste in to the Encryption section of Microsoft documents. Unfortunately, this is pasting the formula rather than the result, and I don't want to have to 'Paste Special' in to a separate document and then Copy and Paste in to the Encryption section.

Is there anything that can be done to allow this to be copied and pasted from the original 'Generator'?

Many thanks in advance for all your help, and here's hoping...
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Welcome to the forum.

You could use a macro like this assigned to a shortcut key:

Code:
Public Sub CopyCellValue()
   Dim objData           As Object
   Set objData = GetObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")

   With objData
      .SetText ActiveCell.Value2
      .PutInClipboard
   End With

End Sub
 
Upvote 0
Thanks so much RoryA for your quick response. I have to admit, I've never ventured in to the realm of VBA, but there's no time like the present. I'll give it a go..

Thanks again.
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,700
Members
448,979
Latest member
DET4492

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