function svgIcon( el, config, options ) {
this.el = el;
this.options = extend( {}, this.options );
extend( this.options, options );
this.svg = Snap( this.options.size.w, this.options.size.h );
this.svg.attr( 'viewBox', '0 0 64 64' );
this.el.appendChild( this.svg.node );
// state
this.toggled = false;
// click event (if mobile use touchstart)
this.clickevent = mobilecheck() ? 'touchstart' : 'click';
// icons configuration
this.config = config[ this.el.getAttribute( 'data-icon-name' ) ];
// reverse?
if( hasClass( this.el, 'si-icon-reverse' ) ) {
this.reverse = true;
}
if( !this.config ) return;
var self = this;
我在Sub Macro1()
Dim Year, Month, lasrow1
lasrow1 = Sheets("bb").Cells.Find("*", [B1], , , xlByRows, xlPrevious).Row
Year = Sheets("aa").Range("C2").Value
Month = Sheets("aa").Range("C3").Value
'----ERROR IN LINE BELOW---
Sheets("bb").Range(Cells(lasrow1 + 1, "B")).Value = Year
'--------------------------
Sheets("bb").Range(Cells(lasrow1 + 1, "C")).Value = Month
Sheets("aa").Select
ActiveSheet.Next.Select
End Sub
收到错误
我试图在找到该表的最后一行后将单元格值(命名为年份)复制到其他工作表。
答案 0 :(得分:0)
以下更改
Sheets("bb").Range(Cells(lasrow1 + 1, "B")).Value = Year
Sheets("bb").Range(Cells(lasrow1 + 1, "C")).Value = Month
要
Sheets("bb").Range(Cells(lasrow1 + 1, 2)).Value = Year
Sheets("bb").Range(Cells(lasrow1 + 1, 3)).Value = Month
使用cells方法需要列号不是字母
答案 1 :(得分:0)
另一种方法是使用Range
object and Offset
property。
Range.Offset(RowOffset,ColumnOffset)
lastrow1 = lastrow1 + 1
'--assuming you are starting at B1 cell, then go down
'--the same column until your desired row
Sheets("bb").Range("B1").Offset(lastrow1,0).Value = Year
Sheets("bb").Range("C1").Offset(lastrow1,0).Value = Month