あるフォルダ内にある「複数ブック(CSV形式)」をエクセルに一括でインポートしたいのです。フォルダ内にある複数のエクセルブックの名前はばらばですが、形式だけが全て同じです。
Book1
A B C
1 1 1
Book2
A B C
2 2 2
Book3
A B C
3 3 3
↑
2つブックがあって最終的には・・・・
Book5
A B C
1 1 1
2 2 2
3 3 3
↑
こうしたいです。複数ブックの一行目以下のデータ全てをひとつのものにまとめたいのです。(全ての複数のCSVブックは一行目は同じです。2行目以降を追加するみたいな感じです。)
いろいろと調べて作ってみたのですが、「デバック」??で黄色くなって全く上手く行きません。
ご存知であれば是非教えてください。
・~・・~・・~・・~・・~・・~・・~・・~・・~・・~・
Sub フォルダ指定連結()
Dim myShell As Object
Dim myFS As Object, myFile As Object
Dim myName As String, myPath As String
Dim myLine As String, newStr As String
Set myShell = CreateObject("Wscript.Shell")
myPath = myShell.Specialfolders("Desktop") & "\aaa\"
Set myShell = Nothing
Set myFS = CreateObject("Scripting.FileSystemObject")
myName = Dir(myPath & "\*.csv\")
Do While myName <> ""
Set myFile = myFS.OpenTextFile(myPath & "\" & myName, 1)
myFile.ReadLine '1行目スキップ
Do Until myFile.AtEndOfStream
myLine = myFile.ReadLine
newStr = newStr & myLine & vbCrLf
Loop
myFile.Close
myName = Dir()
Loop
Set myFile = myFS.CreateTextFile("C:\test.csv\", True)
myFile.Write newStr
myFile.Close
Set myFS = Nothing
Set myFile = Nothing
End Sub
・~・・~・・~・・~・・~・・~・・~・・~・・~・・~・
これが教えていただいたり、自分で修正を加えたりしたぶんですが・・・。
環境はウィンドウズXPで2002です。
あるフォルダ内にある「複数ブック(CSV形式)」をエクセルに一括でインポートしたいのです。フォルダ内にある複数のエクセルブックの名前はばらばですが、形式だけが全て同じです。
Book1
A B C
1 1 1
Book2
A B C
2 2 2
Book3
A B C
3 3 3
↑
2つブックがあって最終的には・・・・
Book5
A B C
1 1 1
2 2 2
3 3 3
↑
こうしたいです。複数ブックの一行目以下のデータ全てをひとつのものにまとめたいのです。(全ての複数のCSVブックは一行目は同じです。2行目以降を追加するみたいな感じです。)
いろいろと調べて作ってみたのですが、「デバック」??で黄色くなって全く上手く行きません。
ご存知であれば是非教えてください。
・~・・~・・~・・~・・~・・~・・~・・~・・~・・~・
Sub フォルダ指定連結()
Dim myShell As Object
Dim myFS As Object, myFile As Object
Dim myName As String, myPath As String
Dim myLine As String, newStr As String
Set myShell = CreateObject("Wscript.Shell")
myPath = myShell.Specialfolders("Desktop") & "\aaa\"
Set myShell = Nothing
Set myFS = CreateObject("Scripting.FileSystemObject")
myName = Dir(myPath & "\*.csv\")
Do While myName <> ""
Set myFile = myFS.OpenTextFile(myPath & "\" & myName, 1)
myFile.ReadLine '1行目スキップ
Do Until myFile.AtEndOfStream
myLine = myFile.ReadLine
newStr = newStr & myLine & vbCrLf
Loop
myFile.Close
myName = Dir()
Loop
Set myFile = myFS.CreateTextFile("C:\test.csv\", True)
myFile.Write newStr
myFile.Close
Set myFS = Nothing
Set myFile = Nothing
End Sub
・~・・~・・~・・~・・~・・~・・~・・~・・~・・~・
これが教えていただいたり、自分で修正を加えたりしたぶんですが・・・。
環境はウィンドウズXPで2002です。
みなさんよろしくお願いします。
長文になりますがw
ノートPCのHDが故障したらしく
メーカー修理に出す前に
デジカメ写真(1ギガちょっと)だけでも取り出したいのですが
どうすれば良いでしょうか?
状態としては
以前までセーフモードまでは起動出来たのですが
今では電源オン後すぐにF8キーを押した時のように
セーフモードなどを選ぶ画面になってしまい
どれを選んでもブルーバックになって
a problem has been detected and windows has been shut down
to prevent damage to your computer
unmountable boot volume
if this is the first time you've seen this stop error screen
restart your computer
if this screen appears again follow
check to make sure any new hardware or software is properly
installed
if this is a new installation
ask your hardware or software manufacturer for any windows
updates you might need
if problems continue
disable or remove any newly installed hardware or software
disable bios memory options such as caching or shadowing
if you need to use safe mode to remove or disable components
restart your computer
press F8 to select advanced startup options
and then select safe mode
stop:0x000000ED
と表示されてしまいます
プロに頼めば取り出せるかもしれませんが
みなさんの知恵を御貸し下さい。
Lavie LR300/8 です