473,322 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Linking to different workbooks

Hi, Thanks to help from this forum ive put together a niffty little excel form. However its quite large and by the time user add more and more items to the good list its gonna get a whole lot larger.

In my work book i refer to certain lists such as: users, suppliers, delivery address, payment type etc.... this is on one worksheet called Options. I have given each list a name and refer to these using the validation tool.

I want to create a different workbook called Lists, which contains the above data. Basically move the options worksheet to a new work book.

Could someone point me in the right direction as to how i could then refer to these lists in a different workbook and how i could possible add to each list form a user form within the original workbook.

Cheers

Manny
Aug 6 '07 #1
1 1498
kadghar
1,295 Expert 1GB
In my work book i refer to certain lists ... I want to create a different workbook ... how i could then refer to these lists in a different workbook ...
You can move between workbooks, just refer to them.
You may open two workbooks in the same Excel and do something like:

Workbooks(2).Worksheets(1).Cells(1,1).Value = Workbooks(1).Worksheets(1).Cells(1,1).Value

You can also put another Excel application in an object doing something like:

Expand|Select|Wrap|Line Numbers
  1. dim obj1 as Object
  2. set obj1= CreateObject("excel.application")
  3. obj1.Workbooks.Add ("c:\file1.xls")
  4. ' and do something as above
  5. Worksheets(1).Cells(1,1).Value = obj1.Worksheets(1).Cells(1,1).Value
If you are moving big ranges it's not a good idea to make a FOR with the instructions above. Sometimes is easier to copy and paste a range something like:

Range(Cells(1,1),Cells(100,1)).Copy
Cells(1,2).PasteSpecial -4163 ' this is a paste only values

You can also define a variant, and put the range there (I like this one more than using the clipboard)

Expand|Select|Wrap|Line Numbers
  1. Dim Rang1
  2. With Workbooks(1).Worksheets(1)
  3.     Rang1 = Range(.Cells(1,1), .Cells(100,1))
  4. End With
  5.  
  6. With Workbooks(2).Worksheets(1)
  7.     Range(.Cells(1,1), .Cells(100,1)) = Rang1
  8. End With
Hope that helps.
Aug 6 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: sunil | last post by:
Hi, We have lot of c and fortran archive libraries that have complex dependencies. We have different server tasks that use some of these libraries. We have developed a tool inhouse that links...
20
by: Steven T. Hatton | last post by:
I just read this in the description of how C++ is supposed to be implemented: "All external object and function references are resolved. Library components are linked to satisfy external...
5
by: Brian | last post by:
I need to import data from 720 csv files into an Access database so I can do some editing prior to loading into a SQL Server. These files came from data output from a mainframe on a monthly basis....
2
by: TheTamdino | last post by:
One of the things that is common between most genealogy databases is that they will have one screen were you log all the information for a given person and then (maybe) have a link to a source...
1
by: deiopajw | last post by:
I have a Back end database on a network drive. The copies of the front end are located on individual pc's (in their C drive). The problem arises when a laptop user naturally hooks up to the...
1
by: Ishan Bhalla | last post by:
Hello, Am not sure if i have put this in the wrong discussion group. I have 2 workbooks with 1 worksheet each. I want to merge the workbooks into one. Any idea how to do it? I am using VB.net...
9
atljpe
by: atljpe | last post by:
I'm a beginner: In MS Excel, my code begins with opening a file located within a shared file & drive. My drive begins with the letter "N" ie. N:\ftwntfilp012 where as other users may give it a...
0
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along...
22
by: robertgregson | last post by:
Using C#, .NET3.5, Visual Studio 2008 and WCF on Windows VISTA SP1, I have written a service, service host (as a C# console application) and a client. The service uses...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.