![]() |
|
|
#1
|
|||
|
|||
|
Hi
I would appreciate some help with vba from access please. The following code works fine: set objSheet = ObjExcel.Sheets("5TH 2004") However, I want the user to provide the sheet name from a form. I have tried all sorts of variations using the form field name me.frmSheet such as set objSheet = ObjExcel.Sheets("me.frmSheet") but no joy. Please can anyone help me? Sue (fairly new to VBA) |
|
#2
|
|||
|
|||
|
Sue,
Try something like: Code:
set objSheet = ObjExcel.Sheets(Forms!frmSheet!NameOfTextBox) |
|
#3
|
|||
|
|||
|
Hi Patrick
Thanks but I am afraid that does not work. I get a type mismatch (error 13). Sue |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Setting a field to be dependent on another | CushingMT | Forms | 0 | 11-19-2008 08:51 AM |
| how do I place date of linked excel sheet in a form | meatgrande | Access | 0 | 02-21-2008 06:52 AM |
| Importing Excel Sheet into Access dbase | tonystowe | Import/Export Data | 0 | 12-08-2006 08:35 AM |
| link excel form to access table | data123 | Import/Export Data | 6 | 06-23-2006 08:17 AM |
| Setting combo box properties | rathfam4 | Programming | 1 | 12-27-2005 11:27 PM |