您如何在VBA中重新定义阵列? [英] How do you redimension an array in VBA?

查看:78
本文介绍了您如何在VBA中重新定义阵列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试重新定义MS Access VBA中的数组.最有效的方法是什么?

I'm attempting to rediminsion an array in MS Access VBA. What is the most efficient way to do this?

推荐答案

如何...

这将保留MyArray中已经存在的数据

This will preserve data already in MyArray

 Redim Preserve MyArray(15)

这将清除MyArray中现有的所有先前数据

This will erase any previous data existing in MyArray

 Redim MyArray(15)

这篇关于您如何在VBA中重新定义阵列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆