Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Lotus SmartSuite Forum

Lotus SmartSuite Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext


Jefferson Davis 21.Jan.12 12:07 PM a Web browser
1-2-3 9.8 Windows XP


Morning all,

I've created a Sub that in testing works as designed. Now I need to "Loop" it. But, I don't know what type of "loop" is needed for this type of script? I attempted to use the "Goto" method, but it looped until I could force a program shutdown.

Here's what I have:

Sub Duplicate_Remover
' This sub "removes" the "duplicate numbers" from a pre-selected "single column" range.
'

'begin loop here - "Begin-1"

'Begin_1:
' Check for an "Empty" cell.
If Selection.CellDisplay = "" Then
[].MoveCellPointer $Up,1
Sendkeys "({END}{UP})", True ' This line sends the active cell back to the top of a non-empty column.
[].MoveCellPointer $Right,1
[].MoveCellPointer $Left,1
' IF the cell is "Empty" - then END the sub.
End ' Sub Quits Here
Else
'
' Create two "RangeNames" to work with.
CurrentDocument.CreateRangeName "Remove_1", CurrentDocument.Selection
[].MoveCellPointer $Down,1
CurrentDocument.CreateRangeName "Remove_2", CurrentDocument.Selection
'
' Verify the two cells contents.
If Remove_2 <> Remove_1 Then
' IF "Remove_2" isn't the same as "Remove_1"...
CurrentDocument.DeleteRangeName "Remove_1"
CurrentDocument.DeleteRangeName "Remove_2"
'refer back to "Begin_1" and re-start here.
' Goto Begin_1

Else
' IF "Remove_2" is the same as "Remove_1"...
Selection.DeleteRows $Partial
CurrentDocument.DeleteRangeName "Remove_1"
[].MoveCellPointer $Up,1
'refer back to "Begin_1" and re-start here.
' Goto Begin_1

End If
End If
End Sub

Can this sub be converted into a looping sub? and if so, what type of loop is needed?

Thanks very much for any suggestions.






What "Loop" to use? (Jefferson Davis... 21.Jan.12)
. . RE: What "Loop" to use? (Jonathan Metzge... 23.Jan.12)
. . . . Would a While - Wend loop work? (Jefferson Davis... 24.Jan.12)
. . . . . . RE: Would a While - Wend loop work?... (Jonathan Metzge... 24.Jan.12)
. . . . . . . . Working (Jefferson Davis... 24.Jan.12)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow