MACRO: Saving clipboard data to a file

ExcelinHR

New Member
Joined
Aug 2, 2014
Messages
20
Hey everyone,

I am trying to build a log that will help my team do their jobs more efficiently.
I've built a UserForm that correctly logs the information entered into it.

I think I've come to my knowledge limit. What i need now, is when the user clicks "add" to submit the data, for excel to capture the image captured by the "PrntScrn" (Print Screen) button, save it to a predetermined folder, and saves a hyperlink on the spreadsheet, getting the title from a TextBox field.

I've created a picture that visualizes the order of operations.

1. User takes a screenshot of online advertisement using Print Screen button.
2. User enters data to be logged.
3. User clicks "Add" to log the information
(Behind the scenes)
a. Excel saves screenshot image to screenshot file.​
b. Excel creates a hyperlink to screenshot in the "Advert Source" cell.​

ugPEqFX.jpg



I would be happy to upload my existing code and/or Excel file if that would help.

If anyone can help me code this i would be so grateful. Thanks!
 
Last edited:

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi,
As a suggestion what about adding a web address textbox to your form where users can enter / place link address?

You could then add code like following to your application:

Code:
    Dim URLAddress As String, CellDisplayText As String
    Dim ScreenTipDisplay As String
    
    URLAddress = URLTextBox
    CellDisplayText = AdvertSourceTextBox
    ScreenTipDisplay = JobTitleTextBox
    
    ActiveSheet.Hyperlinks.Add Anchor:=ActiveCell, _
                                       Address:=URLAddress, _
                                       ScreenTip:=ScreenTipDisplay, _
                                       TextToDisplay:=CellDisplayText

Code is just a suggestion & You would need to adapt to meet your specific project need.

Hope Helpful

Dave
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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