LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 683
Default Range name Database only works on one sheet

All,

The problem I have is that I have 4 sheets containing data. I want to call
the showdataform from a command buttons based on the sheets. I have named the
range "database" in the first sheet, but if I try to apply it to the second
sheet, then all command buttons pick up the last assigned "database" name. In
other words, is there a way to have the database name in all sheet ranges?

Private Sub CommandButton1_Click()

Range("A3:H33").Name = "Database"
SendKeys "%w", False
ActiveSheet.ShowDataForm
End Sub

Private Sub CommandButton2_Click()
Range("A3:H20").Name = "Database"
SendKeys "%w", False
ActiveSheet.ShowDataForm
End Sub

Thanks,
--
Brian McCaffery
 
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
works database - converting elwjr Excel Discussion (Misc queries) 1 December 13th 05 02:30 PM
converting from works database elwjr Excel Discussion (Misc queries) 0 December 11th 05 04:36 PM
OT? Microsoft Works Database Import? Lee Harris Excel Worksheet Functions 2 November 22nd 05 03:33 PM
Transfering Database From Excel to Works Alex Excel Discussion (Misc queries) 0 April 19th 05 03:09 AM
Range only works when Sheet Name is "Sheet1" paul reed Excel Programming 4 September 14th 03 08:37 PM


All times are GMT +1. The time now is 11:12 AM.

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

About Us

"It's about Microsoft Excel"