vba input box的有关问题,麻烦了

fieldset{padding:10px;}

vba input box的问题,麻烦了我想弹出个inputbox,然后根据输入的路径保存文件,怎么还没等我输入呢,文件就处理完了,能不能等inutbox点OK时,程序再执行,或者有其他方法么??

Dims1s1=Range("F1")&":"&Range("H1")DimtosiAsStringDimpathTAsStringpathT=ThisWorkbook.Path&"\"&Replace(ActiveWorkbook.Name,".xls",".ppt")tosi=InputBox("plzinputthePowerPointfilepathandname",Title:="PowerPointfile",Default:=pathT)'PowerPointsaveppApp.ActivePresentation.SaveAsFilename:=tosi'ExcelsheetscopyFori=1ToThisWorkbook.Worksheets.CountThisWorkbook.Worksheets(i).Range(s1).CopyPicturexlScreen,xlPicture'copytoPowerPointSetppSld=ppPst.Slides.Add(Index:=i,Layout:=12)'pasteppSld.Shapes.Paste'CorrectiontomaximizethePowerPointchartpositionandsizeWithppSld.Shapes(1).LockAspectRatio=msoFalse.Top=0.Left=0.Height=ppH.Width=ppWEndWithNexti
——解决方案——————————————————–

tosi=InputBox("plzinputthePowerPointfilepathandname",Title:="PowerPointfile",Default:=pathT)

改成

tosi=Application.InputBox("plzinputthePowerPointfilepathandname",Title:="PowerPointfile",Default:=pathT)

人生有一半掌握在上帝那里,另一半攥在自己的手中。

vba input box的有关问题,麻烦了

相关文章:

你感兴趣的文章:

标签云: