I need to import a worksheet named "Serial Numbers" from a user selected workbook ( I would assume using GetOpenFilename?) and add that sheet to an open workbook. Also need to make sure the imported sheet is named "Serial Numbers". Thanks!
I need to import a worksheet named "Serial Numbers" from a user selected workbook ( I would assume using GetOpenFilename?) and add that sheet to an open workbook. Also need to make sure the imported sheet is named "Serial Numbers". Thanks!
This seems like it covers all the bases:
Please Login or Register to view this content.
Last edited by JBeaucaire; 09-14-2012 at 11:15 AM.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
A couple of errors. In the file open dialog box, no files show up even though the file I want to import is an excel file (version Excel 97-2003 format). I can select all files and then I can see the file I want to import. When I select the file, I get the message box stating that the Serial Number Sheet was not found in that workbook, but that sheet does exist in the import file.
I've highlighted the "default search" line of code in the macro above. Do spend time reading through the macro line by line so you can suss what each thing does. I'd expect you could spot that line of code and edit it if you really looked.
The macro is using specific sheet names, so any hidden spaces or such would cause it to not find it. I'd be happy to look at one of your source files if you care to upload, just to be sure.
Click GO ADVANCED and use the paperclip icon to post up a copy of your workbook.
After goofing around, this worked:
Please Login or Register to view this content.
Ah, so the sheets were actually called Srial Numbers and no Serial Numbers? Goofing around is the All-American method of learning, works for me!
Cheers.
One of the many faux pas I committed while trying to do this. That and fat fingers! Thanks for you help. Much appreciated!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks