Click here to Skip to main content
15,896,915 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: visual basic 2010 homework Pin
Ron Beyer14-Jan-14 5:15
professionalRon Beyer14-Jan-14 5:15 
GeneralRe: visual basic 2010 homework Pin
Member 1052356014-Jan-14 5:21
Member 1052356014-Jan-14 5:21 
GeneralRe: visual basic 2010 homework Pin
Tim Carmichael14-Jan-14 5:44
Tim Carmichael14-Jan-14 5:44 
GeneralRe: visual basic 2010 homework Pin
Member 1052356014-Jan-14 5:47
Member 1052356014-Jan-14 5:47 
GeneralRe: visual basic 2010 homework Pin
Pete O'Hanlon14-Jan-14 6:17
mvePete O'Hanlon14-Jan-14 6:17 
GeneralRe: visual basic 2010 homework Pin
Member 1052356014-Jan-14 14:10
Member 1052356014-Jan-14 14:10 
GeneralRe: visual basic 2010 homework Pin
Pete O'Hanlon14-Jan-14 19:01
mvePete O'Hanlon14-Jan-14 19:01 
QuestionInteracting with Excel: version problem or distribution problem Pin
Steven St. John9-Jan-14 5:14
Steven St. John9-Jan-14 5:14 
Caveat: I'm not a trained programmer. Self-taught to accomplish particular tasks.

OS: Windows 7
.NET version: 3.5
VS version: 2008
Key references: Microsoft Excel 14.0 Object Library, Microsoft Office 14.0 Object Library, Microsoft Visual Basic for Applications Extensibility 5.3


I wrote a program a couple of years ago that takes text files full of numbers (data files from behavioral research projects), transforms the data in particular ways, and displays the results on a form in both text boxes and charts (Microsoft Chart Control). In addition, I have it so that I can click on a button, select what parameters I want to save, and the program will dump all of the transformed data into an Excel workbook (full of several worksheets). The user can select whether to keep Excel open or have Excel open in the background long enough to create and save the file.

Program works great on my office computer (Windows 7, Excel 2010). I now want it to work on a second computer in my research lab (Windows 7, Excel 2013). To accomplish this, I moved only two files: my compiled .exe and a .dll required by the program that has nothing to do with the Excel problem.

When I run the program on this second machine, every function works fine until I go to dump the data to Excel. Then I get an unhandled exception message:

"
System.Runtime.InteropServices.COMException (0x800A03EC): A workbook must contain at least one visible worksheet. 

To hide, delete, or move the selected sheet(s), you must first insert a new sheet or unhide a sheet that is already hidden.
"

Now, because I generally just write programs for my own use, I know very little about how to distribute them, so this problem may be completely due to my failure to move some file to this new machine.

But the error seems to indicate that Excel 2013 works differently than 2010 (i.e., that I should have programmatically set some visible property for new Excel). I don't want to have 2 versions of my program just to work with 2 versions of Excel. (It's not possible for me to downgrade to 2010 on the new machine because our IT dept. will want to re-image the machine which is a big headache for other reasons.)

I can post code later if need be; for now I just was hoping someone familiar with working with different versions of Excel could steer me in the right direction before I get too deep into it. I don't know if I should be going first to the code, first to Excel (I've not used 2013 at all), or first to making sure all of my files are correctly copied. Perhaps I should be creating a setup package rather than just trying to copy files?


**One other note. I have a different program that saves a report in Word, and this program has worked fine on the machine with Word 2013 as on the machine with Word 2010 (and it was programmed back when it was 2007). Apparently that time, though, I made a setup file for this. Maybe not doing that this time was the mistake? (When I make setup files, I have very little idea what I'm doing.)
AnswerRe: Interacting with Excel: version problem or distribution problem Pin
TnTinMn9-Jan-14 16:07
TnTinMn9-Jan-14 16:07 
GeneralRe: Interacting with Excel: version problem or distribution problem Pin
Steven St. John10-Jan-14 4:32
Steven St. John10-Jan-14 4:32 
GeneralRe: Interacting with Excel: version problem or distribution problem Pin
TnTinMn10-Jan-14 8:58
TnTinMn10-Jan-14 8:58 
GeneralRe: Interacting with Excel: version problem or distribution problem Pin
Steven St. John10-Jan-14 9:53
Steven St. John10-Jan-14 9:53 
AnswerRe: Interacting with Excel: version problem or distribution problem Pin
Steven St. John14-Jan-14 10:31
Steven St. John14-Jan-14 10:31 
Questionfile Downloader Help Pin
Member 105110268-Jan-14 2:15
Member 105110268-Jan-14 2:15 
AnswerRe: file Downloader Help Pin
Dave Kreskowiak8-Jan-14 3:10
mveDave Kreskowiak8-Jan-14 3:10 
QuestionAnchor Pin
Tsunamipudip8-Jan-14 2:13
Tsunamipudip8-Jan-14 2:13 
AnswerRe: Anchor Pin
Dave Kreskowiak8-Jan-14 3:04
mveDave Kreskowiak8-Jan-14 3:04 
QuestionTrouble with IF...Then...ElseIf... Pin
big_D7-Jan-14 11:36
big_D7-Jan-14 11:36 
AnswerRe: Trouble with IF...Then...ElseIf... Pin
Bernhard Hiller7-Jan-14 20:49
Bernhard Hiller7-Jan-14 20:49 
GeneralRe: Trouble with IF...Then...ElseIf... Pin
big_D8-Jan-14 7:43
big_D8-Jan-14 7:43 
AnswerRe: Trouble with IF...Then...ElseIf... Pin
GuyThiebaut7-Jan-14 21:54
professionalGuyThiebaut7-Jan-14 21:54 
GeneralRe: Trouble with IF...Then...ElseIf... Pin
big_D8-Jan-14 7:44
big_D8-Jan-14 7:44 
QuestionDatagridView not display any data Pin
Biplob Singha Shee6-Jan-14 7:41
Biplob Singha Shee6-Jan-14 7:41 
AnswerRe: DatagridView not display any data Pin
Dave Kreskowiak6-Jan-14 7:55
mveDave Kreskowiak6-Jan-14 7:55 
AnswerRe: DatagridView not display any data Pin
Ron Beyer6-Jan-14 7:58
professionalRon Beyer6-Jan-14 7:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.