Pergunte aqui

Histórico de revisões [voltar]

Oi @Júnio Vieira, segue as macros e [[arquivo teste](/upfiles/15083678459039269.ods)]

sub OcultarAba2
rem ----------------------------------------------------------------------
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 = "Nr"
args1(0).Value = 2 '<=========== aqui é o numero da aba.
dispatcher.executeDispatch(document, ".uno:JumpToTable", "", 0, args1())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Hide", "", 0, Array())
end sub

.

sub MostrarAba2
rem ----------------------------------------------------------------------
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 = "aTableName"
args1(0).Value = "Planilha2"  '<=========== aqui é o nome da aba.
dispatcher.executeDispatch(document, ".uno:Show", "", 0, args1())
end sub

Oi @Júnio Vieira, segue as macros e [[arquivo teste](/upfiles/15083678459039269.ods)arquivo teste]

sub OcultarAba2
rem ----------------------------------------------------------------------
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 = "Nr"
args1(0).Value = 2 '<=========== aqui é o numero da aba.
dispatcher.executeDispatch(document, ".uno:JumpToTable", "", 0, args1())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Hide", "", 0, Array())
end sub

.

sub MostrarAba2
rem ----------------------------------------------------------------------
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 = "aTableName"
args1(0).Value = "Planilha2"  '<=========== aqui é o nome da aba.
dispatcher.executeDispatch(document, ".uno:Show", "", 0, args1())
end sub

Oi @Júnio Vieira, segue as macros e arquivo teste

sub OcultarAba2
rem ----------------------------------------------------------------------
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 = "Nr"
"aTableName"
args1(0).Value = 2 "Planilha2"  '<=========== aqui é o numero nome da aba.
dispatcher.executeDispatch(document, ".uno:JumpToTable", "", 0, args1())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Hide", "", 0, Array())
end sub

.

sub MostrarAba2
rem ----------------------------------------------------------------------
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 = "aTableName"
args1(0).Value = "Planilha2"  '<=========== aqui é o nome da aba.
dispatcher.executeDispatch(document, ".uno:Show", "", 0, args1())
end sub

Oi @Júnio Vieira, segue as macros e arquivo teste

sub OcultarAba2
rem ----------------------------------------------------------------------
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 = "aTableName"
"Nr"
args1(0).Value = "Planilha2" "2"  '<=========== aqui é o nome numero da aba.
dispatcher.executeDispatch(document, ".uno:JumpToTable", "", 0, args1())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Hide", "", 0, Array())
end sub

.

sub MostrarAba2
rem ----------------------------------------------------------------------
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 = "aTableName"
args1(0).Value = "Planilha2"  '<=========== aqui é o nome da aba.
dispatcher.executeDispatch(document, ".uno:Show", "", 0, args1())
end sub

Oi @Júnio Vieira, segue as macros e arquivo teste

sub OcultarAba2
rem ----------------------------------------------------------------------
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 = "Nr"
"aTableName"
args1(0).Value = "2" "Planilha2"      '<=========== aqui é o numero nome da aba.
dispatcher.executeDispatch(document, ".uno:JumpToTable", "", 0, args1())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Hide", "", 0, Array())
end sub

.

sub MostrarAba2
rem ----------------------------------------------------------------------
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 = "aTableName"
args1(0).Value = "Planilha2"  '<=========== aqui é o nome da aba.
dispatcher.executeDispatch(document, ".uno:Show", "", 0, args1())
end sub