|
求大神帮忙看看,我这代码是不是不对啊?我把带宏的EXCEL另存为不带宏的.xlsx格式,但是另存之后依旧有宏,为什么啊?
代码如下:
Workbooks.Open Filename:="F:\一、资料\库存表.xlsx", AddToMru:=True
Application.RecentFiles.Add Name:="F:\一、资料\库存表.xls"
Workbooks("库存表.xls").Save
另外麻烦帮忙看下以下公式能不能简化呀:
Range("O4:O6").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Range("O8:O10").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Range("O12:O14").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Range("O16:O18").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Range("I4:I6").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Range("I8:I10").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Range("I12:I14").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Range("I16:I18").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
ActiveWindow.ScrollColumn = 1
Range("C16:C18").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Range("C12:C14").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Range("C8:C10").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Range("C4:C6").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Range("B1").Select
十分感谢十分感谢十分感谢帮忙的大神!!!!!!
|
|