|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Newbie requires vba access help please
Hi
I am writing to an Excel spreadsheet from VBA code in access. When I reference the sheet with the sheet name hard coded, it works fine: set objSheet = objExcel.Sheets("5TH 2004") However, I want the sheet name to be taken from a form as this will not be the same every time. I have a form field called frmSheet and have tried all sorts of combinations to use that, to no avail, e.g: set objSheet = objExcel.Sheets("me.frmSheet") Please can someone help me? Sue |
|
#2
|
||||
|
||||
|
try using
set objSheet = objExcel.Sheets(me.frmSheet.text)
__________________
Do, or do not. There is no 'try'. |
|
#3
|
|||
|
|||
|
thank you so much! I spent a long time on that and it was so simple. I just needed to set the focus first and it worked a treat.
Sue |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Newbie requires vba access help please |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|