OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
Menu
Forums
Topics
FAQ
Memberlist
Usergroups
Edit Profile
PM Inbox

Links
OpenOffice.org
OOoMacros.org
OOExtras.org
OOoDocs.org
LinuxSelfhelp.com
more...

Books & Training
Getopenoffice.org
Digitaldistribution.com
8daysaweek.co.uk
more...

Search
 

Search Options

Poll question
would you like openoffice to be skinnable so that it can replicate ms-word and draw in millions more users from ms-universe?
Yes Please!!! [ 7 ]
No. :( [ 13 ]
You cannot vote in polls in this forum
View Results

User of the Moment
Viewing profile :: junkiekid
Joined: 2156 Days
Posts: 1
Location:

Forum Topics Posts
OpenOffice.org Forums
Setup and Troubleshooting
Discuss OpenOffice.org setup and installation issues
9584 36401
OpenOffice.org Writer
Discuss the OpenOffice.org word processor
20308 92074
OpenOffice.org Calc
Discuss the OpenOffice.org spreadsheet application
13366 57921
OpenOffice.org Impress
Discuss the OpenOffice.org presentation application
2783 8621
OpenOffice.org Draw
Discuss the OpenOffice.org drawing application
1100 4253
OpenOffice.org Math
Discuss the OpenOffice.org formula editor
638 2636
OpenOffice.org Base
Discuss the OpenOffice.org database features
6673 25114
OpenOffice.org Macros and API
Discuss OpenOffice.org programming issues
13549 50935
OpenOffice.org Code Snippets
Discuss and share OpenOffice.org code snippets
416 2006
Community Forums
General Discussion
Discuss anything you want
4404 22561
Site Feedback
Provide site feedback and suggestions
369 1972

Need help with simple Macro - Cant get it to loop
Author: geektome :: Posted: Thu Jul 02, 2009 2:25 pm
Hi there,

really simple macro that works as it is one time through, but i cannot make it loop. i have 800 laptops that i need to enter info into a spreadsheet with box number and serial number, and eventually a quality grade. i need it to loop endlessly. i'm entering box number on a usb num pad and scanning serial numbers with a barcode scanner. like i said it works fine on single use basis, but i'm not much of a programer and i've been googling all afternoon. any help would be appreciated.

thanks
graham

REM ***** BASIC *****
sub Main
DO
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
args1(0).Value = "$F$3"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
rem ----------------------------------------------------------------------
Doc = ThisComponent
Sheets = Doc.Sheets
Sheet = Sheets.getByIndex (0)
Cell = Sheet.getCellByPosition(5,2)
Cell.String = InputBox ("BOX #:","Enter System Box Number")
rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "ToPoint"
args2(0).Value = "$B$5"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args2())
rem ----------------------------------------------------------------------
Doc = ThisComponent
Sheets = Doc.Sheets
Sheet = Sheets.getByIndex (0)
Cell = Sheet.getCellByPosition(1,4)
Cell.String = InputBox ("SN #:","Enter System Serial Number")
rem ----------------------------------------------------------------------
'dim args3(0) as new com.sun.star.beans.PropertyValue
'args3(0).Name = "ToPoint"
'args3(0).Value = "$A$34"
'dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args3())
rem ----------------------------------------------------------------------
'Doc = ThisComponent
'Sheets = Doc.Sheets
'Sheet = Sheets.getByIndex (0)
'Cell = Sheet.getCellByPosition(0,33)
'Cell.String = InputBox ("GRADE:","Enter System Grade B B- C")
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:PrintDefault", "", 0, Array())
rem ----------------------------------------------------------------------
LOOP
End Sub


is nested lookup possible?
Author: karenu :: Posted: Thu Jul 02, 2009 2:00 pm
I'm wondering if it is possible to do a 2-way lookup in a Calc spreadsheet. That is, if I want to extract a value out of a grid:

a b c d e ...
1 1a 1b 1c 1d 1e
2 2a 2b 2c 2d 2e
3 3a 3b 3c 3d 3e
4 4a 4b 4c 4d 4e ..
..

And I have 2 cells x and y with variable values a..e and 1..4.

I need to first determine from cell x which lookup column I need to go to then determine
from cell y which row I need to look in.

As far as I can tell LOOKUP can only work with one criterion at a time. If I do 2 separate lookups then there doesn't seem to be a way to use the results of the first in formulating the second (using for example CONCATENATE). Is there a workaround for this? Or an alternative approach?

Thanks.


index
Author: dlk7107 :: Posted: Thu Jul 02, 2009 1:11 pm
How do you refresh or rebuild the index to reflect a new word or phrase? In MS Word you click OK & Yes to replace the index to reflect the new word or phrase.


Can a Report be modified?
Author: steve580 :: Posted: Thu Jul 02, 2009 12:16 pm
To create a report, the only way seems to be to use the Wizard, and wind up with a default layout. Is there any way to create report from scratch, or to modify the Wizard's results. With Access it was possible to enter code for all manner of calculations, showing the date, the number of pages, etc. I have not found any such instructions of OOo Base.


Searching in a Form
Author: steve580 :: Posted: Thu Jul 02, 2009 12:07 pm
When I used Access, after clicking on a field, the Find & Replace icon knew which field to search in. How does this work with OOo Base?


Welcome
Welcome to OOoForum.org, the OpenOffice.org Forum!
 
Register

Log in
Username:

Password:

Log me on automatically
 

Latest Discussion
Thu Jul 02, 2009 5:04 pm relee1950
Sharing OOo base
Thu Jul 02, 2009 3:51 pm frankvan3
Is 3.1 Slow Slow?
Thu Jul 02, 2009 3:43 pm hotpepper
is nested lookup possible...
Thu Jul 02, 2009 3:39 pm thetechnaddict
headless on CentOS
Thu Jul 02, 2009 3:17 pm Mike Pike
macro on subform longer l...

Downloads
Download OpenOffice.org (en)
OOo 2.3.0 Split Download Set
OOo 2.3.0 for Windows
OOo 2.3.0 for Linux
OOo 2.3.0 for Solaris (x86)
OOo 2.3.0 for Mac OS X (Intel)
OOo 2.3.0 for FreeBSD 6.2

Top Ten Posters
1. JohnV 6550
2. Villeroy 6306
3. David 5323
4. Hagar de l'Est 5153
5. jrkrideau 4811
6. acknak 4314
7. AndrewZ 4123
8. DannyB 4064
9. 9point9 3911
10. noranthon 3331

Stats
Our users have posted a total of 304494 articles. We have 76287 registered users. The newest registered user is Neuralconnection.

In total there are 37 users online:
37 Guests

This site is sponsored by:
UnitedLayer

Powered by phpBB © 2007 phpBB Group.