To pass values from one webpart to another you need three thing:
1) interface
This is a class that is created in a seprate project. This connects the two webparts together. The interface project impliments the interface class
namespace connectWebparts
{
public interface passMyValuesInerface
{
string stringDataIWantToPass {get;}
int intDataIWantToPass {get;}
}
}
2) provider
This is the webpart that you would like to send the data from. The key is to add the interface dll to the project (add reference dll).
namespace connectWebpartsProvider
{
public class webpartProviderClass : webpart, passMyValuesInerface
{
}
}
as you can see above the webpartProviderClass now contains the interface class called passMyValuesInerface.
3) consumer
This is the webpart that will get the values from the provider. You need to do the same as the provider class to get access to the interface class to get the values.
To connect the provider to the consumner you need to add the interface project to the provider and consumer (add reference in both provider and consumer webparts)
once you have built and added the webparts to the gallery and then added them to the page you can connect the two weparts together.
Obviously there are other steps that are missing (no need to recreate the wheel) for the provider and consumer class but its explained in detail in the links below.
For an indepth step by step guide you can follow msdn:
http://msdn.microsoft.com/en-us/library/ms469765(v=office.14).aspx
You can also follow this step by step guide with images ;)
http://www.dotnetcurry.com/ShowArticle.aspx?ID=678
If you still have trouble then post your code in your question and ill be happy to help :)