Find first empty row

Lupp, Are you saying you ran the macro using the code in this post and it worked? I will try setting up with bare bones files for both documents to see if presents the same problem. Is this what you meant by “work on a copy” instead of the document itself?

Can you explain how the .Sheets impacts this line rng = oDoc2.Sheets(0).getCellRangeByName("A1") if it is declared as Dim Sheets should this suffice? It isn’t causing the “object variable not set” message is it?

I feel puzzled know. Thought my statements were clear.
“… you ran the macro using the code in this post and it worked?” Yes. This regarding the reserve that I didn’t create a file Summary.ods in the root of my file system. I worked with a file in a standard path for my everyday work. I would expect you also need administrator privileges to place an ordinary file in C:\, and opening it later may bring up the “work on a copy” offer.

Lupp, Didn’t mean to puzzle you. Just wanted to make sure I was understanding before spending even more time trying to get this to work. What your reaffirming has done for me is I know it works if you ran it with success. I will continue to look at things to see if I can breath life into it.

Moved the file out of the root into a folder. Now it’s calling out an unsupported URL. I triple checked the path and the path it’s calling out (below) in the error message appears to be a proper path for Windows

`Message: Unsupported URL <file:///c:/Users/computer%20one/My%20Documents/Summary.ods>: "type detection failed".`

The space encoding %20 shouldn’t be a problem should it?

Also used a blank/fresh Summary.ods spreadsheet being copy/pasted to from the main.ods spreadsheet.

I cannot reproduce anyone of the errors. The first time in my life I even created a folder with one of those silly names containing a space. No chance: No error.
This is getting really annoying. I have to leave the thread.

Lupp, Thank you for your time.

Sorry you became annoyed, that was not the intent. I came to this forum to resolve a legitimate problem.
As for windows putting spaces in a path I don’t know why they do such silly things. It’s Windows. Again, I asked about the spaces to be sure no stone was being left unturned; no other reason.

If anyone else could jump in to provide insight on something that might be causing this I would appreciate it. Thank you.

Sorry. I’m not a native speaker of English and may have used a term in the wrong way. The “annoying” didn’t aim at you but at the strange situation I couldn’t manage. How to handle errors I never saw with my own eyes? Concerning spaces in pathnames: Yes they are coded the html way. I’m on Win, too, and have to accept a few paths containing spaces, in specific the extruciating ‘program files’. I never give a name of the kind to one of my files and Win doesn’t force me.

Your questions are legitimate, of course. However, the current discussion is very far off the original question of this thread. To get new attention for your current problems with opening secondary spreadsheet documents and with using ranges in these documents, you should open a new thread and post the few relevant lines of code.
I personally never had a similar problem under Win 10 with many different versions of LibO and AOO. Did you read Pitonyak meanwhile?

Lupp. Thank your for your reply.

Actually I have been reading the Pitonyak pubs. This approach actually came from “OpenOffice.org Macros Explained” page 497. This is not something I’ve attempted in 5 minutes of my time and immediately went to the forum. I have been digging for weeks looking for the content I need to accomplish this. I came to the forum after doing much due diligence hoping someone could help.

Ran out of characters and will post another comment to continue.

I was originally thinking about posting a new thread but decided to stay with the current thread since it all is part of what I am trying to accomplish. This was apparently a bad decision on my part. I was actually thinking of the overall community when I made this decision so they would have the whole package along with myself. Thinking of others gets me in trouble.

But with your suggestion I will do so.

Thanks again Lupp. Have a nice day. I appreciate it.

One last thing. I am on Windows 7 Pro with LibreOffice 5.2.

Hope you will have success with your next question. And if I get a new idea , I won’t hide it from you.

Hi Lupp. I need to share this with you since you have been such a hugh help and I don’t want you’re expertise and contributions to go unnoticed.

I stepped away from this for awhile and came back to it with a clearer mind today. It was obvious the macro did not like the URL, the error message was clear on that. Didn’t have the presence of mind yesterday to go to the file and get the windows path by shift/right-click and copy. At comment limit and will add another comment.

After getting the windows path and comparing it to the physical path I noticed a difference shown below. I immediately placed it in the function you shared with me and it launched the summary.ods file. Sorry to have caused you frustration, it’s the last thing I wanted. If it’s any consolation I’ve probably knocked time off my life in pursuit of this.

Thanks again Lupp.

Original: c:/Users/computer%20one/My%20Documents/Summary.ods
Windows: "c:\Users\computer one\Documents\Summary.ods

Don’t worry too much. I should have mentioned in my respective comment above that I never saw a “My Documents” folder on a recent Windows system instead of whining. After all I was aware of that strangeness. (However, I am 73 and there may not be too much time left.)
Hoping you got everything now. But don’t hesitate to come back if necessary.

Thanks Lupp

You’re alright in my book. I am turning 55 this year. I hope you have many more prosperous years.

Thank you for extending the offer if I get stumped moving the ball on the remainder of this effort.

Mark,
To preface this, the content is being copied to a new sheet (with a button). I can address it after getting the dynamic row location remedied.

When running this as its on sub (at the bottom of my original code) it errors on this line.
Dim oColumn As Object : oColumn = oSheet.Columns.getByIndex( iColumnIndex )

As a test I replaced (iColumnIndex) with (cColumnIndex) to see its results. It doesn’t error with (cColumnIndex) but the active cell ends up at the very bottom of the sheets “a” column.

I know little of the macros’s, mainly “record macro”! But my test, and how I use it, is where ever active cell is, it will go to bottom of column and activates the empty cell, under the last cell with data in it. On what ever sheet I have it on! Your welcome to look at it! Its a lot, but sub is at top, but not in Basic, I hide it on a hidden sheet, names Macro1, because if I share it, it give warnings about Macros if it is in a Modules, so paste to module . https://goo.gl/5zwX

Thank you Mark but the link is not resolving.

Sorry about that. This should work. https://goo.gl/aLkBSe
Or. https://drive.google.com/file/d/1pY0iqJ0dBaNrr4Ybrx4exTJ6lzJrvOLi/view?usp=sharing