How to open a sheet to a specific range?

I have tried to write a micro to open one of my sheets with a specific range visible. I have not been able to get it to open without it being in the wrong place. I am new at this. Here is my current code: code

and what I’m trying to access.

pic

You need set in event Open Document

Sub active_range()
	sheet_name = "Sheet4"
	cell_name = "K100"
	
	doc = ThisComponent
	cc = doc.CurrentController
	sheet = doc.Sheets.getByName(sheet_name)
	
	cc.setActiveSheet(sheet)
	range = sheet.getCellRangeByName(cell_name)
	cc.select(range)
End Sub

ask.ods

I have the document open when I run the micro. It opens the sheet but I am not sure how to adapt the code you have with my code. To clarify I have a button on sheet 1 (Homepage) that this code is attached. The page it goes to is sheet 2 (PLAN). This is where I edit my food plan.I also have the range named Edit1. Each day of the month has a Range set (Edit1,2,3…). Each day also has sub EditMenu,2,3… They are in the module 1 with many more micros.

I know this is a lot of information but I hope you can use some of it to help me know how to do this.