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