将excel VBA转换为visual basic .NET 2015 [英] Convert excel VBA to visual basic .NET 2015
本文介绍了将excel VBA转换为visual basic .NET 2015的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Dears,
请帮助,如何将VBA转换为VB.net 2015
for例子我有这个代码:
Selection.NumberFormat =[$ -2000000]#,#; [Red](#,## 0)
什么是VB.net代码
我在网上尝试了很多代码,但遗憾的是没有工作
提前致谢
我的尝试:
将我的选择视为Excel.Range
myselection.NumberFormat =[$ -2000000]#,#; [红色] (#,## 0)
解决方案
-2000000]#,#; [红色](#,## 0)
什么是VB.net代码
我在网上尝试了很多代码,但遗憾的是没有工作
提前致谢
我的尝试:
将myselection选为Excel.Range
myselection.NumberFormat =
< blockquote> -2000000]#,#; [Red](#,## 0)
这段代码无法更改MS Excel范围(单元格/单元格)的格式,因为myselection
变量已声明且从未启动过。
Dim myselection as Excel.Range
myselection.NumberFormat =
Dears,
Please help, how to convert VBA to VB.net 2015
for example I have this code:
Selection.NumberFormat = "[$-2000000]#,#;[Red](#,##0)"
what will be the VB.net Code
I tried many codes on the web but unfortunately not working
Thanks in advance
What I have tried:
Dim myselection as Excel.Range
myselection.NumberFormat = "[$-2000000]#,#;[Red](#,##0)"
解决方案
-2000000]#,#;[Red](#,##0)"
what will be the VB.net Code
I tried many codes on the web but unfortunately not working
Thanks in advance
What I have tried:
Dim myselection as Excel.Range
myselection.NumberFormat = "
-2000000]#,#;[Red](#,##0)"
This piece of code can't change formattings for MS Excel range (cell/cells), becausemyselection
variable has been declared and never initiated.
Dim myselection as Excel.Range myselection.NumberFormat = "
这篇关于将excel VBA转换为visual basic .NET 2015的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文