![]() I can only show you the code that I had to go to so that my email triggered off a button in an Excel spreadsheet would work. ![]() This way, the are only running Outlook and Excel on the test server. The solution for us was to create a new Excel published app in citrix that was installed on the same server as our outlook 2010 installation, limit the farm to that one testing server, and publish that app to our test users, while removing their old excel app. ![]() And since their accounts were only configured to use outlook 2010, excel didn't know what to do. so it was trying to send mail through their default email client (outlook 2010) which didn't exist on that server. The problem presented itself when they would open the spreadhseet in excel 2003 on the production xenapp farm - where outlook 2010 wasn't installed. Since these users were test outlook 2010 users their profiles only had permissions to use outlook 2010 and outlook 2010 as their default email client. The problem was our citrix farm setup.Since MS doesnt allow side-by side installs of outlook versions like they do with all other office applications, we had to install outlook 2010 on a "testing" xen app server. I've tried sending it with Outlook open and with it closed. It works well with Outlook 2003 that we have now, but our test group of users cannot use it - they receive the error below.Ĭan anyone help figure this out. It uses some macro (I'm not a programmer) to achieve this. We have an Excel spreadsheet that is basically an expense report that automatically gets emailed to the appropriate people when they click a button in the spreadsheet. GetLastDataRow("Oops.We are planning to upgrade all our users to Outlook 2010 and Exchange 2010 soon but have run into a few headaches with the Outlook migration. GetLastDataRow("AX") = 0 GetLastDataRow("A:X") = -1 GetLastDataRow(2) = 10 GetLastDataRow("B") = 10 If IsEmpty(Cells(Cells(1, col)., col).End(xlUp).Value) ThenĬells(Cells(1, col)., col).End(xlUp).RowĮxample output: GetLastDataRow(1) = 0 GetLastDataRow("A") = 0 If (IsNumeric(col) And col >= 1) Or Len(col) = 1) Or Len(col) <= 2 Then ![]() You call it by passing either the column letter, or column number: Function GetLastDataRow(col As Variant) As Long However, because you pass the column as "A:A", that's not possible, so you would have to replace it with Range(strColName).Column as follows: Function FindLastDataLine(strColName As String) As LongįindLastDataLine = Cells(Range(strColName).Rows.Count, Range(strColName).Column).End(xlUp).RowĪ better solution: the following solution will work on all recent versions of MS Office (2003, 2007, and 2010), and will handle errors. You can do this pretty simply by changing Offset to Cells, removing the initial Range() call (since we're going to choose one cell), and changing 0 to the column you want. You don't want to shift the whole range of cells, but find the last cell in the range. Offset literally shifts a Range by how much you tell it. The second reason is that you are using Offset. To fix it, you just have to reference the same range as you already are (just append it before you call Rows.Count like this: Function FindLastDataLine(strColName As String) As LongįindLastDataLine = Range(strColName).Offset(Range(strColName).Rows.Count - 1, 0).End(xlUp).Row The first, when you put Rows.Count, there is no reference for Rows - it is a property of a Range. Why your method doesn't work: there are two reasons here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |