#1   Report Post  
Luis Verme
 
Posts: n/a
Default Reading dbf files

Hi:
In Excel 2003 in Spanish version, when I open a file with "dbf"
extension, Excel assigns by default a name to the range which is "Base de
Datos". When I try to select this name, a message appears saying there´s an
error with the name. Investigating, I saw that the range names must not have
blank apaces between the words, so the default name must be "Base_de_Datos"
I think this is a bug in the Spanish version of Excel. In the Portuguese
version the default name is "Banco_de_dados".
I use dbf files in Excel to work with Pivot Tables.

Any suggestions

Thanks in advance

Luis Verme






  #2   Report Post  
keepITcool
 
Posts: n/a
Default



yep:
that looks like a bug as range names cannot have spaces.

can you select it from the dropdown?

if so you have a good chance that
the english name can be used in code....and only the "local" name is a
problem..

Try
?Range("Database").address
?Names("Database").namelocal


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Luis Verme wrote :

Hi:
In Excel 2003 in Spanish version, when I open a file with "dbf"
extension, Excel assigns by default a name to the range which is
"Base de Datos". When I try to select this name, a message appears
saying there´s an error with the name. Investigating, I saw that the
range names must not have blank apaces between the words, so the
default name must be "Base_de_Datos" I think this is a bug in the
Spanish version of Excel. In the Portuguese version the default name
is "Banco_de_dados". I use dbf files in Excel to work with Pivot
Tables.

Any suggestions

Thanks in advance

Luis Verme

  #3   Report Post  
Luis Verme
 
Posts: n/a
Default

Thank you for your reply.
The name "Base de Datos" appears in the dropdown but when I select it an
error appears saying it's not a valid name.
The results in the Inmediate Window:

?Range("Database").address
$A$1:$G$3300
?Names("Database").namelocal
Base de datos

The range is correct.

Can I change the namelocal via VBA?

Thanks

Luis Verme


"keepITcool" escribió en el mensaje
ft.com...


yep:
that looks like a bug as range names cannot have spaces.

can you select it from the dropdown?

if so you have a good chance that
the english name can be used in code....and only the "local" name is a
problem..

Try
?Range("Database").address
?Names("Database").namelocal


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Luis Verme wrote :

Hi:
In Excel 2003 in Spanish version, when I open a file with "dbf"
extension, Excel assigns by default a name to the range which is
"Base de Datos". When I try to select this name, a message appears
saying there´s an error with the name. Investigating, I saw that the
range names must not have blank apaces between the words, so the
default name must be "Base_de_Datos" I think this is a bug in the
Spanish version of Excel. In the Portuguese version the default name
is "Banco_de_dados". I use dbf files in Excel to work with Pivot
Tables.

Any suggestions

Thanks in advance

Luis Verme



  #4   Report Post  
keepITcool
 
Posts: n/a
Default


no you cant "change" namelocal as it's part
of the index of the names collection.
BUT you can remove it and replace it with a new name.

dim s$
s=Names("database").referstor1c1
Names("database").delete
Names.add "database", referstor1c1:=s

the local name is now equal to english name: "database"



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Luis Verme wrote :

Can I change the namelocal via VBA?

  #5   Report Post  
Luis Verme
 
Posts: n/a
Default

Thanks for your reply.
I tried the code you sent me but a 1004 error when it executes
Names("database").Delete

Private Sub Workbook_Open()
Dim s$
s = Names("database").RefersToR1C1
Names("database").Delete
Names.Add "database", RefersToR1C1:=s
End Sub

Any suggestions

Luis Verme

"keepITcool" escribió en el mensaje
ft.com...

no you cant "change" namelocal as it's part
of the index of the names collection.
BUT you can remove it and replace it with a new name.

dim s$
s=Names("database").referstor1c1
Names("database").delete
Names.add "database", referstor1c1:=s

the local name is now equal to english name: "database"



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Luis Verme wrote :

Can I change the namelocal via VBA?





  #6   Report Post  
keepITcool
 
Posts: n/a
Default

Luis..
WHY in workbook_open?
you only need to do it once. then save the dbf as an xls.






--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Luis Verme wrote :

Thanks for your reply.
I tried the code you sent me but a 1004 error when it executes
Names("database").Delete

Private Sub Workbook_Open()
Dim s$
s = Names("database").RefersToR1C1
Names("database").Delete
Names.Add "database", RefersToR1C1:=s
End Sub

Any suggestions

Luis Verme

"keepITcool" escribió en el mensaje
ft.com...

no you cant "change" namelocal as it's part
of the index of the names collection.
BUT you can remove it and replace it with a new name.

dim s$
s=Names("database").referstor1c1
Names("database").delete
Names.add "database", referstor1c1:=s

the local name is now equal to english name: "database"



--
keepITcool
www.XLsupport.com | keepITcool chello nl | amsterdam



Luis Verme wrote :

Can I change the namelocal via VBA?

  #7   Report Post  
Luis Verme
 
Posts: n/a
Default

I have to keep updated the dbf file so that other people use it. I take
information from the dbf to make some reports and update it via Excel with
the current month orders.


"keepITcool" escribió en el mensaje
ft.com...
Luis..
WHY in workbook_open?
you only need to do it once. then save the dbf as an xls.






--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Luis Verme wrote :

Thanks for your reply.
I tried the code you sent me but a 1004 error when it executes
Names("database").Delete

Private Sub Workbook_Open()
Dim s$
s = Names("database").RefersToR1C1
Names("database").Delete
Names.Add "database", RefersToR1C1:=s
End Sub

Any suggestions

Luis Verme

"keepITcool" escribió en el mensaje
ft.com...

no you cant "change" namelocal as it's part
of the index of the names collection.
BUT you can remove it and replace it with a new name.

dim s$
s=Names("database").referstor1c1
Names("database").delete
Names.add "database", referstor1c1:=s

the local name is now equal to english name: "database"



--
keepITcool
www.XLsupport.com | keepITcool chello nl | amsterdam


Luis Verme wrote :

Can I change the namelocal via VBA?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
merging my excel files Donna YaWanna Excel Discussion (Misc queries) 1 June 14th 05 12:53 AM
multiple text files URGENT tasha Excel Discussion (Misc queries) 1 December 19th 04 05:44 PM
importing multiple text files URGENT!!! HELP tasha Excel Worksheet Functions 0 December 19th 04 04:26 PM
importing multiple text files??? tashayu Excel Discussion (Misc queries) 0 December 19th 04 02:43 PM
Why does Excel saves all my files as temporary files? Arija Excel Discussion (Misc queries) 2 December 7th 04 11:38 PM


All times are GMT +1. The time now is 09:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"