如何纠正VBA [英] how to correct a VBA

查看:65
本文介绍了如何纠正VBA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将计费保存在单独的工作簿中。应该保存并在清除之前将信息发布在我的注册表中。



  Sub  SaveStatementWithNewName()
Dim NewFN As 变体
将发票复制到新工作簿
ActiveSheet.Copy
NewFN = C:\ Users \iaquino \Documents \Billing Statements& Range( F4 )。值& .xlsx ;
ActiveWorkbook.SaveAs NewFN,FileFormat:= xlOpenXMLWorkbook
ActiveWorkbook.Close
NextBillingStatement
End Sub

解决方案

它应该读(一行):



 NewFN =C :\Users\iaquino\Docum ents \Billing Statement& Range(F4)。Value& .XLSX


I am trying to save my billing in a separate workbook. It should be saving and before clearing to post the information on my register.

Sub SaveStatementWithNewName()
    Dim NewFN As Variant
   'Copy Invoice to a new workbook
    ActiveSheet.Copy
    NewFN = "C:\Users\iaquino\Documents\Billing Statements& Range("F4").Value & ".xlsx";
    ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
    ActiveWorkbook.Close
    NextBillingStatement
End Sub

解决方案

It should probably read (one line):

NewFN = "C:\Users\iaquino\Documents\Billing Statement " & Range("F4").Value & ".xlsx"


这篇关于如何纠正VBA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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