2 Questions Regarding Macro Debug: 1. Hyperlink Debug and 2. Add/Delete Page In Macro, deleting sequence

jmcgillis14

New Member
Joined
Sep 24, 2014
Messages
12
Here are my two issues:
1. I am having a hard time figuring out this "Debug." I copy and pasted the code below. It has two do with an image I inserted in the Macro then hyperlinked it to a website

2. I added a sheet by mistake then deleted it. Every time I run the Macro it pops up "Are you sure you want to delete this page?" Annoying. How do I get rid of that sequence all together. I am pasting the code below. A little help on what to delete would be great. It is sheet4 (I renamed it "Link" then deleted.

Thank you so much in advance.

Code for Question 1 (Bold Font is hilighted Yellow in Module Code):

Range("F20").Select
ActiveSheet.Pictures.Insert( _
"C:\Users\Cash1Pawn\Desktop\upload-1118929_960_720.png").Select
Selection.ShapeRange.IncrementLeft -123.6
Selection.ShapeRange.IncrementTop -163.2
Selection.ShapeRange.ScaleWidth 0.4522222222, msoFalse, msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 0.4522222222, msoFalse, _
msoScaleFromBottomRight
Selection.ShapeRange.IncrementLeft -273
Selection.ShapeRange.IncrementTop -313.8
Selection.ShapeRange.IncrementLeft -41.4
Selection.ShapeRange.IncrementTop -23.4
Selection.ShapeRange.ScaleWidth 0.6117936118, msoFalse, msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 0.6117936118, msoFalse, _
msoScaleFromBottomRight
Selection.ShapeRange.IncrementLeft -90.6
Selection.ShapeRange.IncrementTop -75
Range("C4:F19").Select
Selection.Locked = False
Selection.FormulaHidden = False
Sheets("Import").Select
Sheets("Data").Visible = True
Cells.Select
Range("A14").Activate
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("A24").Select
Sheets("Data").Select
ActiveWindow.SelectedSheets.Visible = False
ActiveSheet.Shapes.Range(Array("Picture 2")).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection.ShapeRange.Item(1), Address:= _
"https://deleter.transactionpro.com/TpiPlus/Importer/Login.aspx"
Range("C5:F17").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("F12").Select

Code for Question 2:
End With
Cells.Select
Range("A14").Activate
Sheets("Data").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets.Add After:=ActiveSheet
Cells.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Sheets("Sheet4").Select
Sheets("Sheet4").Name = "Link"
Range("F13").Select
Application.WindowState = xlMaximized
Sheets("Link").Select
ActiveWindow.SelectedSheets.Delete
Cells.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
.PatternTintAndShade = 0
End With

 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,222,903
Messages
6,168,939
Members
452,227
Latest member
sam1121

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