A couple of things that @Mat's Mug didn't mention.
- Use
Option Explicit
You set Betreich
equal to a range, but the variable isn't declared anywhere. You'll nip a lot of runtime errors in the bud if you let the compiler catch the lack of variable declaration.
Again, we're looking to avoid runtime errors, but there is a style issue here as well. You use worksheet and range objects elsewhere in your code. Why not here? Be consistent.
rng.EntireRow.Select
With Selection
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)
Sheets(ActiveSheet.Name).Name = "EURUSD"
rng.EntireRow.Copy Worksheets("EURUSD").Cells(5, 1)
End With
Which brings me to..
- Properly indent your code.
Ok, so it was already mentioned, but it's a biggie for readability.
A couple of things that @Mat's Mug didn't mention.
- Use
Option Explicit
You set Betreich
equal to a range, but the variable isn't declared anywhere. You'll nip a lot of runtime errors in the bud if you let the compiler catch the lack of variable declaration.
Again, we're looking to avoid runtime errors, but there is a style issue here as well. You use worksheet and range objects elsewhere in your code. Why not here? Be consistent.
rng.EntireRow.Select
With Selection
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)
Sheets(ActiveSheet.Name).Name = "EURUSD"
rng.EntireRow.Copy Worksheets("EURUSD").Cells(5, 1)
End With
Which brings me to..
- Properly indent your code.
Ok, so it was already mentioned, but it's a biggie for readability.
A couple of things that @Mat's Mug didn't mention.
- Use
Option Explicit
You set Betreich
equal to a range, but the variable isn't declared anywhere. You'll nip a lot of runtime errors in the bud if you let the compiler catch the lack of variable declaration.
Again, we're looking to avoid runtime errors, but there is a style issue here as well. You use worksheet and range objects elsewhere in your code. Why not here? Be consistent.
rng.EntireRow.Select
With Selection
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)
Sheets(ActiveSheet.Name).Name = "EURUSD"
rng.EntireRow.Copy Worksheets("EURUSD").Cells(5, 1)
End With
Which brings me to..
- Properly indent your code.
Ok, so it was already mentioned, but it's a biggie for readability.
A couple of things that Mat's@Mat's Mug didn't mention.
- Use
Option Explicit
You set Betreich
equal to a range, but the variable isn't declared anywhere. You'll nip a lot of runtime errors in the bud if you let the compiler catch the lack of variable declaration.
Again, we're looking to avoid runtime errors, but there is a style issue here as well. You use worksheet and range objects elsewhere in your code. Why not here? Be consistent.
rng.EntireRow.Select
With Selection
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)
Sheets(ActiveSheet.Name).Name = "EURUSD"
rng.EntireRow.Copy Worksheets("EURUSD").Cells(5, 1)
End With
Which brings me to..
- Properly indent your code.
Ok, so it was already mentioned, but it's a biggie for readability.
A couple of things that Mat's Mug didn't mention.
- Use
Option Explicit
You set Betreich
equal to a range, but the variable isn't declared anywhere. You'll nip a lot of runtime errors in the bud if you let the compiler catch the lack of variable declaration.
Again, we're looking to avoid runtime errors, but there is a style issue here as well. You use worksheet and range objects elsewhere in your code. Why not here? Be consistent.
rng.EntireRow.Select
With Selection
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)
Sheets(ActiveSheet.Name).Name = "EURUSD"
rng.EntireRow.Copy Worksheets("EURUSD").Cells(5, 1)
End With
Which brings me to..
- Properly indent your code.
Ok, so it was already mentioned, but it's a biggie for readability.
A couple of things that @Mat's Mug didn't mention.
- Use
Option Explicit
You set Betreich
equal to a range, but the variable isn't declared anywhere. You'll nip a lot of runtime errors in the bud if you let the compiler catch the lack of variable declaration.
Again, we're looking to avoid runtime errors, but there is a style issue here as well. You use worksheet and range objects elsewhere in your code. Why not here? Be consistent.
rng.EntireRow.Select
With Selection
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)
Sheets(ActiveSheet.Name).Name = "EURUSD"
rng.EntireRow.Copy Worksheets("EURUSD").Cells(5, 1)
End With
Which brings me to..
- Properly indent your code.
Ok, so it was already mentioned, but it's a biggie for readability.
A couple of things that Mat's Mug didn't mention.
- Use
Option Explicit
You set Betreich
equal to a range, but the variable isn't declared anywhere. You'll nip a lot of runtime errors in the bud if you let the compiler catch the lack of variable declaration.
Again, we're looking to avoid runtime errors, but there is a style issue here as well. You use worksheet and range objects elsewhere in your code. Why not here? Be consistent.
rng.EntireRow.Select
With Selection
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)
Sheets(ActiveSheet.Name).Name = "EURUSD"
rng.EntireRow.Copy Worksheets("EURUSD").Cells(5, 1)
End With
Which brings me to..
- Properly indent your code.
Ok, so it was already mentioned, but it's a biggie for readability.