ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,738
- Office Version
- 2007
- Platform
- Windows
Morning.
The code in use is shown below "partial snippet"
The piece of code that i am interested in is shown in RED
I am watching the screen as i type values in the userform & pressing yes / no to MsgBoxes etc etc.
I see a MsgBox "HAS THE SECURITY MARK BEEN APPLIED" & when i press either YES or NO i see the worksheet in the background update.
It is NOW i wish the code in REd below to also run.
Ive placed the code in various places but i only see it run when i leave the userform.
The code in use is shown below "partial snippet"
The piece of code that i am interested in is shown in RED
I am watching the screen as i type values in the userform & pressing yes / no to MsgBoxes etc etc.
I see a MsgBox "HAS THE SECURITY MARK BEEN APPLIED" & when i press either YES or NO i see the worksheet in the background update.
It is NOW i wish the code in REd below to also run.
Ive placed the code in various places but i only see it run when i leave the userform.
Rich (BB code):
On Error Resume Next
With ThisWorkbook.Worksheets("POSTAGE").Cells(lastrow + 1, 4).Comment
.shape.Autoshapetype = msoShapeRoundedRectangle
.shape.TextFrame.Characters.Font.Name = "Times Roman" ' FONT FAMILY STYLE
.shape.TextFrame.Characters.Font.Size = 12 ' TEXT SIZE
.shape.TextFrame.Characters.Font.ColorIndex = 5 ' TEXT COLOR
.shape.LINE.ForeColor.RGB = RGB(0, 0, 0) ' ARROW & LINE COLOR
.shape.Fill.Visible = msoTrue
.shape.Fill.ForeColor.RGB = RGB(255, 255, 255) ' FILL COLOR
.shape.TextFrame.AutoSize = True
End With
On Error GoTo 0
Dim colorHTML As String, r As String, g As String, b As String
If MsgBox("HAS THE SECURITY MARK BEEN APPLIED ?", vbYesNo + vbExclamation, "PINK SECURITY MARK MESSAGE") = vbYes Then
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox6.Value = ""
TextBox9.Value = ""
TextBox10.Value = ""
.Cells(lastrow + 1, 11).Value = "YES"
Application.ScreenUpdating = True
Else
.Cells(lastrow + 1, 11).Value = "NO"
Application.ScreenUpdating = True
On Error GoTo 10
For Each Cell In Range("D:D").SpecialCells(xlCellTypeComments)
Cell.Value = "COMMENT MSG"
Next Cell
Exit Sub
10:
MsgBox "NO COMMENTS MSG WERE FOUND IN COLUMN D", vbCritical, "COMMENTS MSG ERROR MESSAGE"
Application.Goto Sheets("POSTAGE").Range("B" & Rows.Count).End(xlUp), True
End If
err:
Const FILE_PATH As String = "C:\Users\Ian\Desktop\REMOTES ETC\DR\EBAY CUSTOMERS PHOTOS\"
If ActiveCell.Column = Columns("B").Column Then
If Len(Dir(FILE_PATH & ActiveCell.Value & ".jpg")) Then
ActiveCell.Hyperlinks.Add Anchor:=ActiveCell, Address:=FILE_PATH & ActiveCell.Value & ".jpg"
MsgBox "CUSTOMER PHOTO HYPERLINK WAS SUCCESSFUL.", vbInformation, "POSTAGE SHEET HYPERLINK MESSAGE"
End If
Else
MsgBox "PLEASE SELECT A CUSTOMER FIRST TO HYPERLINK THE PHOTO.", vbCritical, "POSTAGE SHEET HYPERLINK MESSAGE"
Exit Sub
End If
If Dir(FILE_PATH & ActiveCell.Value & ".jpg") = "" Then
If MsgBox("****** POSTAGE SHEET HAS NOW BEEN UPDATED ******" & vbCrLf & vbCrLf & " NO PHOTO TO HYPERLINK FOR THIS CUSTOMER" & vbCrLf & vbCrLf & _
" WOULD YOU LIKE TO OPEN THE PHOTO FOLDER ?" & vbCrLf & vbCrLf & _
" YES = OPEN THE PHOTO FOLDER" & vbCrLf & vbCrLf & _
" NO = HYPERLINK IS NOT REQUIRED", vbYesNo + vbCritical, "HYPERLINK CUSTOMER MISSING PHOTO MESSAGE.") = vbYes Then
CreateObject("Shell.Application").Open ("C:\Users\Ian\Desktop\REMOTES ETC\DR\EBAY CUSTOMERS PHOTOS\")
MsgBox "CONTINUE TO NOW HYPERLINK CUSTOMER & PHOTO ?", vbInformation, "HYPERLINK PHOTO MESSAGE"