Message 1 of 4

Not applicable
09-12-2018
11:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying rename each of my sheets. What am I doing wrong?
Sub Main() oDrawDoc = ThisApplication.ActiveDocument For Each oSheet In oDrawDoc.Sheets ModSheetName(oSheet) Next End Sub Sub ModSheetName(oSheet As Inventor.Sheet) Dim SheetName As String = oSheet.Name sTemp = InputBox("New Sheet Name", SheetName, SheetName)
'Message box to see that I get the new value i = MessageBox.Show(sTemp, "My iLogic Dialog", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1) oSheet.Name = UCase(sTemp)
'Message to to see if the new value was accepted i = MessageBox.Show(oSheet.Name, "My iLogic Dialog", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1) oSheet.Parent.Update End Sub
Also, is the update needed?
Thanks in advance.
Mike
Solved! Go to Solution.