URGENT HELP IN PDF HYPERLINKING VBA PLEASE

Status
Not open for further replies.

AYSHANA

Board Regular
Joined
Oct 16, 2021
Messages
90
Office Version
  1. 2019
  2. 2013
Platform
  1. Windows
Great day to all!!

i have a user form , and i want to hyperlink each (Delivery Note) to the (shipoutlist column) AND IMMEDIATELY IT WILL HYPERLINK TO THE PDF FILE

here is my code:

Option Explicit
Private Sub CommandButton1_Click()

Dim TargetRow As Integer
Dim Component As String 'Component
Dim MissingData As Boolean
Dim Ctrl As Control

ThisWorkbook.Sheets("Database").unprotect "AWAM"
ThisWorkbook.Sheets("INSPECTION FORM").unprotect "AWAM"



For Each Ctrl In Me.Controls
Select Case TypeName(Ctrl)
Case "TextBox", "ComboBox"
If Trim(Ctrl.Text) = "" Then
MissingData = True
Ctrl.BackColor = RGB(255, 255, 153) 'color highlight to indicate missing data
Else
Ctrl.BackColor = vbWhite 'if there is data
End If
End Select
Next Ctrl

If MissingData Then
MsgBox "Please fill highlighted empty boxes before saving", vbExclamation
Exit Sub
End If


TargetRow = Sheets("ENGINE").Range("B3").Value + 1
Component = TEXT_COMPO

Sheets("Database").Range("Delivery_Note").Offset(TargetRow, 0).Value = TEXT_DEL
Sheets("Database").Range("Delivery_Note").Offset(TargetRow, 1).Value = TEXT_COMPO
Sheets("Database").Range("Delivery_Note").Offset(TargetRow, 2).Value = TEXT_REC
Sheets("Database").Range("Delivery_Note").Offset(TargetRow, 3).Value = TEXT_DATE
Sheets("Database").Range("Delivery_Note").Offset(TargetRow, 4).Value = TEXT_DISP

Sheets("Database").Range("Delivery_Note").Offset(TargetRow, 5).Value = HEMO
Sheets("Database").Range("Delivery_Note").Offset(TargetRow, 6).Value = CLOT
Sheets("Database").Range("Delivery_Note").Offset(TargetRow, 7).Value = BAG
Sheets("Database").Range("Delivery_Note").Offset(TargetRow, 8).Value = LABEL
Sheets("Database").Range("Delivery_Note").Offset(TargetRow, 9).Value = COOLANT
Sheets("Database").Range("Delivery_Note").Offset(TargetRow, 10).Value = SEGMENT
Sheets("Database").Range("Delivery_Note").Offset(TargetRow, 11).Value = TEMP
Sheets("Database").Range("Delivery_Note").Offset(TargetRow, 12).Value = RECBY
Sheets("Database").Range("Delivery_Note").Offset(TargetRow, 13).Value = DATIME



Unload FORM1

MsgBox Component & " was added to the Database", 0, "Complete"


ThisWorkbook.Sheets("Database").protect "AWAM"
ThisWorkbook.Sheets("INSPECTION FORM").protect "AWAM"


End Sub

Private Sub CommandButton2_Click()


ThisWorkbook.Sheets("Database").unprotect "AWAM"
ThisWorkbook.Sheets("INSPECTION FORM").unprotect "AWAM"


Unload FORM1

ThisWorkbook.Sheets("Database").protect "AWAM"
ThisWorkbook.Sheets("INSPECTION FORM").protect "AWAM"


End Sub


Private Sub DATIME_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
On Error Resume Next
Me.DATIME = CDate(Me.DATIME)
End Sub

Private Sub TEXT_DATE_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
On Error Resume Next
Me.TEXT_DATE = CDate(Me.TEXT_DATE)

End Sub

Private Sub TEXT_DISP_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
On Error Resume Next
Me.TEXT_DISP = CDate(Me.TEXT_DISP)
End Sub
database.JPG
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Duplicate to: URGENT HELP IN PDF HYPERLINKING PLEASE

In future, please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.

In relation to your question here, I have closed this thread so please continue in the linked thread.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,390
Messages
6,119,235
Members
448,879
Latest member
VanGirl

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