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

¦p¦óÅýListBox¥i¥HÀHµÛÀx¦s®æ¤ºªº¼Æ¦rÅܤÆ

¦^´_  syuan

§Aªº·N«ä¬O¿ï¤@±iªíªº¹ï§a? ¥i¥H³o¼Ëªº

dim strsht as string
strsht ="sheet1"

.. ...
kimbal µoªí©ó 2010-8-31 20:04


·PÁÂkimbal¤jªº±Ð¾É

¤p§Ì¸Õ¤F¤@¤U¡A¨Ã±N±zªº»yªkµy§ï¤F¤@¤U¡]±N«Å§i®³±¼¤F¡^

ElseIf UserForm1.ListBox1.ListIndex = 6 And UserForm1.ListBox2.ListIndex = 2 And UserForm1.ListBox3.ListIndex = 0 Then
With UserForm2.ListBox1
     .RowSource = Worksheets("xxxx").Range("M6:N9").Address(, , , 1)
     .ColumnCount = 2
     .ColumnWidths = "100"
End With
UserForm2.Show

³o¼Ë°õ¦æ«á¡A¤@¼Ë¥i¥H¹F¨ì¤p§Ì­ì¥ýªº»Ý¨D¡ã¡ã

¤£¹L¤p§Ì­ì¥ýªºµ{¦¡¬O¦³«Å§iªº¡A¥Î±zªº»yªk«á¡A¤£¦ý¦æ¼Æ´î¤Ö¤F¡A­ì¥ýªºªº«Å§i¤]¤£»Ý­n¤F¡I¯u¬O¤@Á|¼Æ±o¡I

¤£¹L¤p§Ì¦n©_ªº¬O¡A¦b.range("m6:n9")ªº«á­±¦³­Ó¥[¤W.Address(,,,1)

¤p§Ì·Q¨Ó·Q¥h¡AÁÙ¬O¤£À´·N«ä¡I§Æ±æ±z©Î¬O¦U¦ì¥ý¶i¯àÀ°¤p§Ì¸Ñ¤@¤U´b¡I

¯¬¦U¦ì¤¤¬î¨Î¸`´r§Ö¡ã¡ã
¿ú¬O«Ü±I²öªº¡A©Ò¥H·|·Q¿ìªk»E¦b¤@°_¡I

TOP

VBA»¡©ú
»yªk

¹Bºâ¦¡.Address(RowAbsolute, ColumnAbsolute, ReferenceStyle, External, RelativeTo)

¹Bºâ¦¡   ¥Nªí Range ª«¥óªºÅܼơC

°Ñ¼Æ

¦WºÙ ¥²­n/¿ï¥Î ¸ê®ÆÃþ«¬ ´y­z
RowAbsolute ¿ï¥Î Variant ¦pªG¬° True¡A«h·|¥Hµ´¹ï°Ñ·Óªº§Î¦¡¶Ç¦^¹ï¦Cªº°Ñ·Ó¡C¹w³]­È¬° True¡C
ColumnAbsolute ¿ï¥Î Variant ¦pªG¬° True¡A«h·|¥Hµ´¹ï°Ñ·Óªº§Î¦¡¶Ç¦^¹ïÄ檺°Ñ·Ó¡C¹w³]­È¬° True¡C
ReferenceStyle ¿ï¥Î XlReferenceStyle °Ñ·Ó¼Ë¦¡¡C¹w³]­È¬° xlA1¡C
External ¿ï¥Î Variant ¦pªG¬° True «h·|¶Ç¦^¥~³¡°Ñ·Ó¡C¦pªG¬° False «h·|¶Ç¦^°Ï°ì°Ñ·Ó¡C¹w³]­È¬° False¡C
RelativeTo ¿ï¥Î Variant ¦pªG RowAbsolute ¤Î ColumnAbsolute ³£¬° False¡A¦Ó¥B ReferenceStyle ¬° xlR1C1¡A«h¥²¶·¥]§t¬Û¹ï°Ñ·Óªº°_©lÂI¡C¦¹¤Þ¼Æ§Y¬°©w¸q°_©lÂIªº Range ª«¥ó¡C
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¡i»X½ªªº¦Û¥Ñ¡j¤H±`¦b¤°»ò³£¥i¥H¦Û¥Ñ¦Û¦bªº®É­Ô¡A«o³Q³oºØÀH¤ß©Ò±ýªº¦Û¥Ñ»X½ª¡AµêÂY®É¥ú¦Ó²@µLıª¾¡C
ªð¦^¦Cªí ¤W¤@¥DÃD