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...
 

Some videos you may like

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,067
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
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
 

ViniTaylor

New Member
Joined
Mar 22, 2016
Messages
2
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,514
Messages
5,596,610
Members
414,080
Latest member
penguin23

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
Top