ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¥i¥H±N¹B¦Û¥X¨Óªº­Èµ¹RANGE(),·í¤Þ¼Æ¶Ü?

¥i¥H±N¹B¦Û¥X¨Óªº­Èµ¹RANGE(),·í¤Þ¼Æ¶Ü?

¦p:Dim str_ran as string,­Y¹Bºâ«á str_ran ="A:1040"¨º»ò³o¼Ëªº«ü©w¥i¥H¦¨¥ß¶Ü? RANGE(STR_RAN)?
V98

两Ïú±¡况¤U¥i¥H¦¨¥ß:
1.¨Ï¥Î¦W称:
°²设¤u§@ï¦s¦b¦W称"AAA",则¤U¦C¥N码¦¨¥ß:
Sub test1()
    Dim str_ran As String
    str_ran = "AAA"
    MsgBox Range(str_ran).Address
End Sub

2.¨Ï¥Î单¤¸®æ­S围:
Sub test2()
    Dim str_ran As String
    str_ran = "a1:c300"
    MsgBox Range(str_ran).Address
End Sub

§A©Ò说ªº"A:1040"¬J¤£¯à§@为¦W称(¦]为¥¦¤£²Å¦X¦W称ªº©R¦W规则),¤S¤£¯àªí¥Ü¥X单¤¸®æªº­S围.

TOP

et5323¤j¤j¦pªG¦p¤U¤ù¬q,
    rows_count = Range("A1").CurrentRegion.Rows.Count
    str_rows_count = "1:" + Str(rows_count)
    Rows(str_rows_count).RowHeight = 19.2
    ·|¶]¤£¤U¥h,¦]¬°·|¥X²{¦p¤Uªº¿ù»~°T®§"«¬ºA¤£¦X",rowS_count = 1040
    str_rows_count = "1:1040"
    ¦pªG§ï¦¨³o¼Ë´N¥i¥H¶]:rows("1:1040"),rows()¤£±µ¨üÅܼƤ޼ƥG?
    ÁÂÁ«ü¾É!!
V98

TOP

¦^´_ 3# linshin1999
rows_count = Range("A1").CurrentRegion.Rows.Count
str_rows_count = "1:" + Str(rows_count)
MsgBox Len(Str(rows_count))
MsgBox Len(rows_count)
  ³o¥i§i¶D§A¿ù¦b­þ¸Ì
'''''''''''''''''''''''''''''''''''''''''''''''''''¤U­±¥i¦æ
rows_count = Range("A1").CurrentRegion.Rows.Count
str_rows_count = "1:" &  rows_count    ¦r¦ê³s±µ­n¥Î &
Rows(str_rows_count).RowHeight = 19.2

TOP

ÁÂÁ GBKEE ª©¥D,+ ©M & ®t§O¦b³o¸Ì°Ú!,
V98

TOP

str_rows_count = "1:" + Trim(Str(rows_count)) ³o¼Ë¤]¥i¥H,+¸¹·|¦h²£¥Í¤@­ÓªÅ¥Õ,ÁÂÁ GBKEE ª©¥D.
V98

TOP

+  ¸ò &  ªº¥Îªk  ¡A³Ì¦n¬O°Ï¤À¶}¨Ó¡A§Kªº·d¶Ã±¼(ÁöµM¦n¹³+ ¸ò& ¤@¼Ë)
¼Æ­È¥Î  +
¤å¦r¥Î  &
¬O¾Çµ{¦¡¦Ó¤£¬O­nµ{¦¡¡A¬O¶i¨Bªº°ò¦

TOP

ÁÂÁÂ!! ¥H«e¼gªºµ{¦¡¥Î + ©Ò¥H³e¥Î,¦ý¬O·t¶Â¿ôªº¬O!
V98

TOP

        ÀR«ä¦Û¦b : µêªÅ¦³ºÉ¡D§ÚÄ@µL½a¡AµoÄ@®e©ö¦æÄ@Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD