09-13-2018
12:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-13-2018
12:12 PM
The easiest solution to use is to wrap the ChangeRow function in a Try statement. Here's an example:
SyntaxEditor Code Snippet
oLength = 20 'input the Length your looking for here. Try iPart.FindRow("iComponentName:1", "Length", "=", oLength) Catch MessageBox.Show("Part Length of " + CStr(oLength) + " not found!", _ "Length Error", _ MessageBoxButtons.OK, _ MessageBoxIcon.Hand, _ MessageBoxDefaultButton.Button1) End Try
It will try to find a row where the column "Length" has a value of 20, if it's found, it will automatically change to that row. If an error occurs, it will catch that error and display a message box for you.