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

[µo°Ý] ¤å¦rÀɶ}±Ò

[µo°Ý] ¤å¦rÀɶ}±Ò

½Ð°Ý§Ú·Q­n¥Î¥¨¶°¶}±Ò¦h­Ó¤å¦rÀÉ
ÀɮצWºÙ¬° y(i)-->y(1),y(2),y(3),...
¨º¤U½X«ç»ò­×§ï

Sub ¶}±ÒÀÉ®×()
Dim name, i, x, oldname
oldname = ThisWorkbook.Name
Range("A1").Select
x = InputBox("¼Æ¶q")

For i = 1 To x
  name = i & ".txt"


·PÁÂ!

¦^´_ 13# koplkjnm

ÀɦW¬O¦r¦ê«¬ºA
txt_name = "s (" & i & ").txt"
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 12# GBKEE
¦pªþ¥ó
³Â·Ð§A¤F ÁÂÁÂ

123.rar (12.34 KB)

TOP

¦^´_ 11# koplkjnm
ªþÀɬݬÝ
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 10# GBKEE
µ{¦¡¸Õ¤F¤§«á·|¥X²{«¬ºA¤£²Å¦XªºÄµ§i

TOP

¦^´_ 9# koplkjnm
¦pªG§Ú±N¥¦§ï¦¨¹³ÂŦrªº³¡¤À¥i¥H¶Ü?
µ{¦¡¸Õ¤F¦³°ÝÃD¶Ü?
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 8# GBKEE
GBKEE¤j §A¦n
¤U­±¬õ¦rªº¦a¤èÀ³¸Ó¨S¦³¿ù
¥i¬O³o¼Ëªº¸Ü·Pı¤W¥¦ÁÙ¬O·|·j´MÀɮצW¬°1.txt, 2.txt,...§@¶}±Òªº°Ê§@
¨S¿ìªk¶}±ÒÀɮצW¬°y(1), y(2),...
¦pªG§Ú±N¥¦§ï¦¨¹³ÂŦrªº³¡¤À¥i¥H¶Ü?
©ÎªÌ¬O­þ¸Ì­n¦A¸É¥R©Î­×§ïªº

³Â·Ð§A¤F ·PÁÂ

Option Explicit
Sub ¤å¦rÀÉ®×()
Dim txt_name, i, x, oldname
Dim y As  Variant
oldname = ThisWorkbook.Name
Range("A1").Select
x = InputBox("Àɮ׼ƶq")
For i = 1 To x
  txt_name = i & ".txt" '<--§ï¦¨   txt_name =y( i) & ".txt"

    Workbooks.OpenText Filename:=ThisWorkbook.Path & "\" & txt_name, Origin:=950 _
        , StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
        ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=False _
        , Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1), _
        Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1), _
        Array(10, 1)), TrailingMinusNumbers:=True
        Windows(txt_name).Activate

       Range("A" & i).Select
        '·í=1 ¬°  Range("A1").Select
        '·í=2 ¬°  Range("A2").Select   ¬O³o¼Ë¶Ü? ..............

        
    Next
End Sub

TOP

¦^´_ 7# koplkjnm
  1. Option Explicit
  2. Sub ¤å¦rÀÉ®×()
  3. Dim txt_name, i, x, oldname
  4. oldname = ThisWorkbook.Name
  5. Range("A1").Select
  6. x = InputBox("Àɮ׼ƶq")
  7. For i = 1 To x
  8.   txt_name = i & ".txt"
  9.     Workbooks.OpenText Filename:=ThisWorkbook.Path & "\" & txt_name, Origin:=950 _
  10.         , StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
  11.         ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=False _
  12.         , Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1), _
  13.         Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1), _
  14.         Array(10, 1)), TrailingMinusNumbers:=True
  15.         Windows(txt_name).Activate
  16.         '******³o¬qµ{¦¡µù¸Ñ±¼(¤£¥Î¤F)
  17.         'If i = 1 Then
  18.         'Range("A1").Select
  19.         'Else
  20.         ' Range("A2").Select
  21.         'End If
  22.         '***********************
  23.         Range("A" & i).Select
  24.         '·í=1 ¬°  Range("A1").Select
  25.         '·í=2 ¬°  Range("A2").Select   ¬O³o¼Ë¶Ü? ..............
  26.         
  27.     Next
  28. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 6# GBKEE

GBKEE¤j ©êºp¥i¯à§Úªº²z¸Ñ¸û®t
°£¤F­×§ï¬õ¦rªº¦a¤è,¨ä¥L¤£»Ý­×§ï¶Ü?
Range("A" & i).Select  ³o¦a¤è¤£¤Ó²M·¡·N«ä?
³Â·Ð§A¤F ÁÂÁÂ

Sub Ex()
    Dim A As Variant, i As Integer, x As Integer
    x = InputBox("Àɮ׼ƶq")
    For i = 1 To x
        Range("A" & i).Select
        '************************
        'If I = 1 Then
            'Range("A1").Select
        'Else
            'Range("A2").Select
        'End If
        '*****************************
    Next
End Sub '

TOP

¦^´_ 5# koplkjnm
°t¦X 1# ÀɮצWºÙ¬° y(i)-->y(1),y(2),y(3),...   ³o¬°°}¦C
¦p y = Array("abc", "acc", "qqq", "aaa", "ccc")
y(1)="abc"
y(2)="acc"
y(3)="qqq"

4# ¥i§ï
  1. Sub Ex()
  2.     Dim A As Variant, i As Integer, x As Integer
  3.     x = InputBox("Àɮ׼ƶq")
  4.     For i = 1 To x
  5.         Range("A" & i).Select
  6.         '************************
  7.         'If I = 1 Then
  8.             'Range("A1").Select
  9.         'Else
  10.             'Range("A2").Select
  11.         'End If
  12.         '*****************************
  13.     Next
  14. End Sub '
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¹ï¤÷¥À­nª¾®¦¡A·P®¦¡B³ø®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD