Basic Syntax Error Expected Sub
Contents |
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 syntax error expected end of line but found identifier hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges
Syntax Error Expected After This Token
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. syntax error expected ident for declaration name got literal Join them; it only takes a minute: Sign up How to port Excel VBA macro to OpenOffice macro? up vote 1 down vote favorite 1 How to port Excel VBA macro to OpenOffice macro? Here is macro for creating syntax error expected something like a name or a unicode delimited identifier 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 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
Syntax Error Expected Global Temporary
& 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 Object, c As Object Dim qCells As Object, enuCells As Object sh = ThisComponent.Sheets.getByName("YourSheetName") z = sh.getCellRangeByName("B1:B5") ' your column (or rectangle) qCells = z.queryContentCells(-1) enuCells = qCells.Cells.createEnumeration Do While enuCells.hasMoreElements c = enuCells.nextElement c.Formula = "=HYPERLINK(""http://" & c.String & """)" Loop End Sub share|improve this answer answered Feb 27 '14 at 12:18 triwo 174719 What caused your problem, could you explain a little? &ndash
from GoogleSign inHidden fieldsBooksbooks.google.com - Providing complete and thorough coverage of macro programming in OpenOffice.org, this guide teaches users to create their own macros and to understand their underlying structure. An introduction to the creation syntax error expected something between the word and management of macros in OpenOffice is presented, and each function syntax error expected expression got end of script and command is described....https://books.google.com/books/about/OpenOffice_org_Macros_Explained.html?id=cHVIk-BlwA0C&utm_source=gb-gplus-shareOpenOffice.org Macros ExplainedMy libraryHelpAdvanced Book SearchGet print bookNo eBook availableHentzenwerkeAmazon.comBarnes&Noble.comBooks-A-MillionIndieBoundFind in a libraryAll sellers»Get
Syntax Error Expected An Indented Block
Textbooks on Google PlayRent and save from the world's largest eBookstore. Read, highlight, and take notes, across web, tablet, and phone.Go to Google Play Now »OpenOffice.org Macros http://stackoverflow.com/questions/22014812/how-to-port-excel-vba-macro-to-openoffice-macro ExplainedAndrew Douglas Pitonyak, C. Robert Pearsall, Amy BoyerHentzenwerke, 2004 - Computers - 476 pages 1 Reviewhttps://books.google.com/books/about/OpenOffice_org_Macros_Explained.html?id=cHVIk-BlwA0CProviding complete and thorough coverage of macro programming in OpenOffice.org, this guide teaches users to create their own macros and to understand their underlying structure. An introduction to the creation and management of macros in OpenOffice is presented, and each https://books.google.com/books?id=cHVIk-BlwA0C&pg=PA7&lpg=PA7&dq=basic+syntax+error+expected+sub&source=bl&ots=DWLYLksR_C&sig=1ZEOTnWMM6oFWy_gUWynmz4Ivlg&hl=en&sa=X&ved=0ahUKEwjPtYng3q_PAhUQ3YMKHQwFCBIQ6AEIOjAD function and command is described. Specific techniques to perform a variety of commonly requested functions are provided, including actions common to all applications in the OpenOffice.org suite, such as printing or saving files, as well as those specific to the individual application—Write, Calc, Impress, and Draw. Numerous examples and explanations demonstrate proper techniques and discuss known problems and solutions. The underlying data structure is discussed, and techniques are introduced to evaluate OpenOffice objects, facilitating the use of returned objects in the absence of sufficient documentation by the original programming team. Preview this book » What people are saying-Write a reviewUser Review - Flag as inappropriateYou are a wonderful guy ... Full of wonderful explanations and clear examples... Thank you for this fantastic resource - by producing it you have made it possible to programme in OO_Basic ... ( An otherwise daunting and mystifying process ).Greg McC, Liverpool, UKSelected pagesTitle PageTable of ContentsIndexContentsGetting Started 1 Language Constructs 19 Subroutines and functions 38 Operators 45 Conclu
Properties of a Breakpoint 2 Observing the Value of https://help.libreoffice.org/Basic/Debugging_a_Basic_Program Variables 3 The Call Stack Window 4 List of Run-Time Errors Breakpoints and Single Step Execution You can check each line in your Basic program for errors using single step execution. Errors are easily traced since you can immediately see the result of each step. A pointer in the breakpoint column of the Editor indicates the current line. syntax error You can also set a breakpoint if you want to force the program to be interrupted at a specific position. Double-click in the breakpoint column at the left of the Editor window to toggle a breakpoint at the corresponding line. When the program reaches a breakpoint, the program execution is interrupted. The single step execution using the Single Step syntax error expected icon causes the program to branch into procedures and functions. The procedure step execution using the Procedure Step icon causes the program to skip over procedures and functions as a single step. Properties of a Breakpoint The properties of a breakpoint are available through its context menu by right-clicking the breakpoint in the breakpoint column. You can activate and deactivate a breakpoint by selecting Active from its context menu. When a breakpoint is deactivated, it does not interrupt the program execution. Select Properties from the context menu of a breakpoint or select Breakpoints from the context menu of the breakpoint column to call the Breakpoints dialog where you can specify other breakpoint options. The list displays all breakpoints with the corresponding line number in the source code. You can activate or deactivate a selected breakpoint by checking or clearing the Active box. The Pass Count specifies the number of times the breakpoint can be passed over before the program is interrupted. If you enter 0 (default setting) the program is always interrupted as soon
be down. Please try the request again. Your cache administrator is webmaster. Generated Sun, 02 Oct 2016 00:41:06 GMT by s_hv999 (squid/3.5.20)