Redian新闻
>
Help: How to pass a cell matrix as a variable in the arguments of a VBA function
avatar
Help: How to pass a cell matrix as a variable in the arguments of a VBA function# Programming - 葵花宝典
n*u
1
I need to pass a cell matrix with variable size (m X n) to a own defined VBA
fuction myfun(dataRange as Range). In this function the selected cell
matrix will be stored in an data array. I used to use Range.CurrentArray or
Range.Value2 to store the data into an assigned array variable successfully.
However, it requires the cells contain no formula. If the data in the cells
are obtained by a formula, everything screws up.
The code is shown below:
‘The function stores the data in selected cell mat
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。