Message 1 of 4

Not applicable
11-24-2020
02:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi. I have 2 codes. They work beautifully, however they work on all sheets and I just want them to work on the active sheet. Someone who can help me edit the codes?
Code 1 (Delete Scale)
For Each oSheet As Sheet In ThisDrawing.Document.Sheets
For Each oView As DrawingView In oSheet.DrawingViews
oView.Label.FormattedText = oView.Label.FormattedText.Replace("<DrawingViewScale/>", "").Replace("(", "").Replace(")", "")
Next
Next
Code 2 (Delete Border)
Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveEditDocument
Dim oCurrentNumber As Sheet
oCurrentNumber = oDoc.ActiveSheet
' Iterate through the sheets, and delete the title blocks and symbols
Dim oSheet As Sheet
For Each oSheet In oDoc.Sheets
oSheet.Activate
Try
oSheet.Border.Delete
Catch
'catch error if no border found
End Try
Next
Solved! Go to Solution.