Problem with Excel since loading VS express

I have a spreadsheet that I have been using for over a year that has a lot of coding behind it using VB.

Since I loaded Visual Studio Express the spread sheet throws errors in funny places. For instance now I get an error when I try to add a date to the spread sheet using the Calendar control. The line that throws the error follows:

Me.Calendar1.Value = Date (It doesnt like Date)

another line that errors is a simple line of code

vRows = 1

I have gone back to a version of the spreadsheet that I had saved to a CD to make sure the spreadsheet was OK (like it was when I knew it worked and I get the same thing)

If I go to another computer it works as expected so I suspect something has changed since I loaded Visual Studio on my computer.

I get errors in other places in the spreadsheet as well.

Does anyone know what might be going on here

I do not even know how to go about fixing the issues in the spread sheet, I mean what could be wrong with vrows=1!!!!!! or the Date method



Answer this question

Problem with Excel since loading VS express

  • Kray0la

    In VBEE, you must now dim all variables (this is the new default behavior (OPTION EXPLICIT).  I wonder if you try changing your one line of code

    vRows=1

    to

    Dim vRows as Integer = 1

    If this works, then you probably need to update the code to reflect changes in VB versions.


  • MSTIDragon

    I'm assuming that the problems ocurr in Excel. Check the 'references' in Excel; see if there are any unsual or missing references. Often, errors occur on lines not related to the actual problem, when there's a reference issue.

    Try making a new spreadsheet and add the minimum of code to make it break.

    It's possible that it may have something to do with the calendar control - VBExpress may have updated the control (that's just a guess).



  • Dylan Lingelbach MSFT

    I Appreciate the responses. I will look over the code in the spreadsheet and see if I can clean things up and be more explicit.

    Carl


  • Gibril

     Carl In Milford wrote:

    I have a spreadsheet that I have been using for over a year that has a lot of coding behind it using VB.

    Since I loaded Visual Studio Express the spread sheet throws errors in funny places. For instance now I get an error when I try to add a date to the spread sheet using the Calendar control. The line that throws the error follows:

    Me.Calendar1.Value = Date (It doesnt like Date)

    another line that errors is a simple line of code

    vRows = 1

    I have gone back to a version of the spreadsheet that I had saved to a CD to make sure the spreadsheet was OK (like it was when I knew it worked and I get the same thing)

    If I go to another computer it works as expected so I suspect something has changed since I loaded Visual Studio on my computer.

    I get errors in other places in the spreadsheet as well.

    Does anyone know what might be going on here

    I do not even know how to go about fixing the issues in the spread sheet, I mean what could be wrong with vrows=1!!!!!! or the Date method

    Strange.... You could Install VB Express on the Computer with the Working Spreadsheet and if you encounter the same situation then it probably is VB Express....  The Problem is "You can't Go back Home"......


  • Problem with Excel since loading VS express