Qlikview常用VB脚本

Qlikview常用VB脚本

1.使用输入框inputbox()获取用户输入,传给指定变量
sub Input
	userNm = inputBox("Input your username")
	ActiveDocument.Variables("yourVariable").SetContent userNm, true
end sub
2.运行外部程序
FUNCTION RunExe(cmd) 
	CreateObject("WScript.Shell").Exec(cmd) 
END FUNCTION  

SUB CallExample 
	RunExe("c:\Program Files\Internet Explorer\iexplore.exe") 
END SUB
3.保存并退出
SUB SaveAndQuit 
	ActiveDocument.Save    
	ActiveDocument.GetApplication.Quit 
END SUB

sub save
	ActiveDocument.reload  '加载
	ActiveDocument.Save    '保存
	Application.Quit       '退出
end sub
4.重新加载数据
SUB Reload
	ActiveDocument.Reload'显示执行窗口= GUI上的“重新加载”按钮
END SUB

SUB DoReload
	ActiveDocument.DoReload()'不显示执行窗口
END SUB
5.显示和隐藏工作表选项卡行
Sub ShowTab
	set docprop = ActiveDocument.GetProperties
	docprop.ShowTabRow=true
	ActiveDocument.SetProperties docprop
End Sub

Sub HideTab
	set docprop = ActiveDocument.GetProperties
	docprop.ShowTabRow=false
	ActiveDocument.SetProperties docprop
End Sub
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值