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

EXCEL¶K¤Jºô­¶°ÝÃD

¦^´_ 1# die78325
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim R, ¦r¦ê As String, S As String
  4.     For Each R In [A1:H10].Rows
  5.         S = Join(Application.Transpose(Application.Transpose(R)), " ")
  6.         ¦r¦ê = IIf(¦r¦ê = "", S, ¦r¦ê & Chr(10) & S)
  7.    Next
  8.    '
  9.    '
  10.    
  11.   ' With .Document
  12.    '     .getElementsByName("q11")(0).Value = ¦r¦ê   ' §ä¨ìq11Äæ¦ì¶ñ¤J
  13.   'End With

  14. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# die78325
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Ar(), ¦r¦ê As String, xi As Integer, xii As Integer, S As String, Rng As Range
  4.     'With Range("A1").CurrentRegion
  5.     'CurrentRegion ÄÝ©Ê  ¶Ç¦^ Range ª«¥ó¡A¸Óª«¥ó¥Nªí¥Ø«eªº°Ï°ì¡C¥Ø«e°Ï°ì¬O«ü¥H¥ô·NªÅ¥Õ¦C¤ÎªÅ¥ÕÄ檺²Õ¦X¬°Ãä¬Éªº½d³ò¡C°ßŪ
  6.     'MsgBox .Address
  7.     Set Rng = Sheet1.[a1]
  8.     With Sheet1.Range(Rng.Address, Cells(Rng.End(xlDown).Row, Rng.End(xlToRight).Column).Address)
  9.         MsgBox .Address(, , , 1, 1)
  10.         Ar = .Value
  11.         For xi = 1 To .Rows.Count
  12.             For xii = 1 To .Columns.Count
  13.                 Ar(xi, xii) = IIf(.Cells(xi, xii) <> "", .Cells(xi, xii).Text, vbTab)
  14.             Next
  15.         Next
  16.         For xi = 1 To UBound(Ar)
  17.             S = Join(Application.Transpose(Application.Transpose(Application.Index(Ar, xi))), vbTab)
  18.             ¦r¦ê = IIf(¦r¦ê = "", S & vbLf, ¦r¦ê & vbLf & S)
  19.         Next
  20.         MsgBox ¦r¦ê
  21.    End With
  22. '  '
  23.    '
  24.    
  25.   ' With .Document
  26.    '     .getElementsByName("q11")(0).Value = ¦r¦ê   ' §ä¨ìq11Äæ¦ì¶ñ¤J
  27.   'End With

  28. End Sub
½Æ»s¥N½X

TOP

¦^´_ 6# die78325
³o¨Ç¨Ã¤£Ãø,¤£¤F¸Ñªº¥i¦h¬ÝVBAªº»¡©ú

TOP

¦^´_ 8# die78325
DataObject ª«¥ó
¦b¶i¦æÂà´«°Ê§@®É¡A°µ¬°®æ¦¡¤Æ¤å¦r¸ê®Æªº¼È¦s°Ï°ì¡C¨ä¤]¥i¥H¼È¦s©MÀx¦s¦b DataObject ªº¤å¦r¤ù¬q¬ÛÃöªº®æ¦¡¡C
  1. Option Explicit
  2. Sub Ex()  '¨Ï¥ÎDataObject ª«¥ó
  3.     Dim Rng As Range
  4.     'Dim Clip As New DataObject
  5.     ' New DataObject:  VBA»Ý³]©w¤Þ¥Î Microsoft Forms 2.0 Object Library
  6.     Dim Clip As Object  '¤£»Ý³]©w¤Þ¥Î Microsoft Forms 2.0 Object Library
  7.     Set Clip = CreateObject("new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
  8.     Set Rng = Sheet1.[a1]
  9.     Sheet1.Range(Rng.Address, Cells(Rng.End(xlDown).Row, Rng.End(xlToRight).Column).Address).Copy
  10.     Clip.GetFromClipboard
  11.     '
  12.     '
  13.    
  14.    With .Document
  15.         .getElementsByName("q11")(0).Value = Clip.GetText(1)    ' §ä¨ìq11Äæ¦ì¶ñ¤J
  16.   End With

  17. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¬°¤H³B¥@­n¤p¤ß²Ó¤ß¡A¦ý¤£­n¡u¤p¤ß²´¡v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD