View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.setup
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Rename Worksheets From German to English Sheet1

I don't see anything in your code that refers to the name or codename.

If that code is in a General module, then both refer to the activesheet.

So you could use something like:

Sub Filter_notfinished()
'
' Filter_notfinished Makro
' Makro am 24.05.2006 von Kerstin Kämper aufgezeichnet
'
With worksheets("nameyouseeinthetabinexcel")
.AutoFilterMode = False
.Range("A7:Z7").AutoFilter Field:=10, Criteria1:=""
End With

'or using the codename

With TheCodeNameYouSeeInTheVBE
.AutoFilterMode = False
.Range("A7:Z7").AutoFilter Field:=10, Criteria1:=""
End With

End Sub

=========
But I'm confused with your comment about the codename being "sheet(1)" or
"tablle(1)". Those parens aren't allowed in the codename property.

I'm betting that those are the names you see in the tabs in excel.

Then that With statement would look like:
with worksheets("Sheet1(1)")
or
with worksheets("tablle(1)")

Be careful with your spelling--it has to match exactly. Even space characters
are important!

wayne wrote:
<<snipped
Sub Filter_notfinished()
'
' Filter_notfinished Makro
' Makro am 24.05.2006 von Kerstin Kämper aufgezeichnet
'
With ActiveSheet
.AutoFilterMode = False
.Range("A7:Z7").AutoFilter Field:=10, Criteria1:=""
.Range("J8").Select
End With

End Sub

OR

Sub Filter_notfinished()
'
' Filter_notfinished Makro
' Makro am 24.05.2006 von Kerstin Kämper aufgezeichnet

AutoFilterMode = False
Range("A7:Z7").AutoFilter Field:=10, Criteria1:=""
Range("J8").Select

End Sub

Both of the above work when the worksheet codename is sheet(1), but
neither work when the code sheetname is tablle(1). One fails with
errors in the vba, the other simply doesn't do anything.

I fixed one sheet by creating a new worksheet and copying the contents
of the first into it, but I have several workbooks with the same code
and multiple sheets and was hoping there was a better way.

It seems a bit strange to me that the VBA is in English and seems to
work on the German computers, but English computers have a problem!

Thanks again for your help.

--
Wayne
glenmeadows.us
A democracy is nothing more than mob rule, where fifty-one percent of
the people may take away the rights of the other forty-nine. [Thomas
Jefferson]


--

Dave Peterson