Basic Syntax Error Unexpected Symbol
Contents |
in number formatting are lost Next message: [Libreoffice-bugs] [Bug
Syntax Error Unexpected T_symbol Expecting
71814] BASIC syntax error: Unexpected symbol: Destination visual basic syntax error Messages sorted by: [ date ] [ thread ] [ subject
C++ Syntax Error
] [ author ] https://bugs.freedesktop.org/show_bug.cgi?id=71814 Priority: medium Bug ID: 71814 Assignee: libreoffice-bugs at lists.freedesktop.org Summary: BASIC syntax error: vba syntax error Unexpected symbol: Destination Severity: normal Classification: Unclassified OS: All Reporter: scott.danner.sd at gmail.com Hardware: Other Status: UNCONFIRMED Version: 4.1.3.2 release Component: Spreadsheet Product: LibreOffice Created attachment 89500 --> https://bugs.freedesktop.org/attachment.cgi?id=89500&action=edit Fixed Cost Plus Opening attached xls (from java syntax error http://www.dot.il.gov/desenv/escalationmaterials.html > Fixed Cost Plus) results in BASIC syntax error: Unexpected symbol: Destination (a macro called on CALCULATE button) Looks like it's trying to copy-paste a value: Worksheets("ESCALATION").Range("H11").Copy _ Destination:=Worksheets("ESCALATION").Range("D18") Thanks for considering improvements to support it. -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL:
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to port Excel VBA macro to OpenOffice https://lists.freedesktop.org/archives/libreoffice-bugs/2013-November/157845.html macro? up vote 1 down vote favorite 1 How to port Excel VBA macro to OpenOffice macro? Here is macro for creating hyperlinks: Sub HyperMaker() Dim r As Range Dq = Chr(34) For Each r In Selection r.Formula = "=HYPERLINK(" & Dq & "http://" & r.Text & Dq & ";" & Dq & r.Text & Dq & ")" Next r End Sub I tried convert this macro http://stackoverflow.com/questions/22014812/how-to-port-excel-vba-macro-to-openoffice-macro to OpenOffice macro (using http://www.business-spreadsheets.com/vba2oo.asp) Sub HyperMaker() Dim r As Dim oSheet as Object[n]oSheet = ThisComponent.CurrentController.ActiveSheet[n]oSheet.getCellRangeByName($1) Dq = Chr(34) For Each r In Selection r.Formula = "=HYPERLINK(" & Dq & "http://" & r.Text & Dq & ";" & Dq & r.Text & Dq & ")" Next r End Sub But got errors: BASIC syntax error: Unexpected symbol: Dim. , Expected:,. Replacing Dim with comma not help. How to make it work in OpenOfffice? excel vba excel-vba openoffice.org share|improve this question edited Feb 24 '15 at 0:31 pnuts 33.7k63569 asked Feb 25 '14 at 12:53 triwo 174719 I have no clue how OpenOffice macros are different from VBA but Dim r as is missing type? Range doesn't seem to be recognizable data type by the converter you've used so try Dim r as Variant instead. –user2140173 Feb 25 '14 at 13:22 Right, I dont have OpenOffice so I can't really help you out on this one. Maybe someone else will show up and rescue you –user2140173 Feb 25 '14 at 14:53 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted Solution: Sub makeHyperlinks() Dim sh As Object, z As Obj
of B in the first hour and do Part C in the second hour. You must show your tutor Part B by the mid-point of the second hour or you may not be able to http://www.cse.unsw.edu.au/~en1811/15s2/labs/lab06/lab06.html be assessed at all. Don't panic if you don't get Part C finished, A and B are the most important. Remember to save from within the editor! There's a fair amount of description in the lab notes: if your considered reaction is TL;DR and you understand generally what's going on, here is the quick version: Part A: debug the subprogram ThinkOfANumber in module PartA. Use the sheet PartA_NumThink. Part B: write syntax error a function B2A that accepts a bearing and returns the equivalent mathematical angle; test using the data on sheet PartB_B2A. Part C: write a function EFujita that classifies a tornado given its maximum wind speed, using the enhanced Fujita scale descriptors as defined in any reputable source. Test using sheet PartC_Tornado. Objectives After completing this lab, students should be able to Use the debugger to single-step a subprogram that uses selection basic syntax error Use If-Then-Else statements to implement algorithms involving simple decisions Call a Basic function via a worksheet formula Design algorithms incorporating a small number of decisions Assessment You should be ready to demonstrate the results Parts B and C to your tutor. They will decide which programs to question you about. Preparation It is essential that you have devised the algorithm for Part B before you attend the lab, have pseudocode (mixed English statements with Basic structures) on paper, and preferably have worked out the whole function. If you wait until getting to the lab before even thinking about the problem, the two hours will evaporate before you know it. Download the spreadsheet lab06.ods. It has one sheet for each part, and either incomplete or incorrect procedures. Part A: Tracing and Debugging Open the lab workbook, and enable macros if necessary. Note that you may get a pop-up message "BASIC syntax error. Unexpected symbol ?" This is because the workbook contains buggy OO Basic code which you need to correct. Openoffice can be quite adamant with the pop-up message, just keep clicking 'OK' and Openoffice will eventually give up. Select sheet PartA_NumThink, enter 1 in any cell and leave it as the active cell (bold border). Edit the ThinkOfANumber subprogram by na