Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc,microsoft.public.excel
|
|||
|
|||
VBA connected vs disconnected from network?
Cross posted from Excel.Programming
Anyone know why some code would work fine when not plugged into my company’s LAN, but not when I am plugged into the LAN? I mean, other than Macro Security, is there something else I should be checking? The Macro Security shows medium in either condition, but the code will not work when I am on the LAN… And while I'm here, anyone know what to change in NumberFormat so a currency symbol will be displayed with negative figures as well as positive? Thanks, Troy Here is the code: Private Sub Worksheet_Calculate() Const CURRENCYTYPES As String = ":GBP£:JPY¥:EUR€:USD$:CAD$:MEX$:BRL $:" Static pv As Variant Dim cv As Variant cv = Me.Range("V35").Value2 'unless the current value (cv) is a 4-char string different than the cached 'previous value (pv), there's nothing to do, so exit quickly If cv = pv Or VarType(cv) < vbString Or Len(CStr(cv)) < 4 Then Exit Sub Else cv = ":" & cv & ":" End If If InStr(1, CURRENCYTYPES, cv, vbTextCompare) 0 Then Me.Range("F49:AF49").NumberFormat = Mid$(cv, 5, 1) & "_([$ -2] * #,##0_);_([$ -2] * (#,##0);_([$ -2] * ""-""_);_(@_)" pv = Mid$(cv, 5, 1) End If End Sub |
#2
Posted to microsoft.public.excel.misc,microsoft.public.excel
|
|||
|
|||
VBA connected vs disconnected from network?
HI;
These factors have to be checked: 1- That users pulling or using the macro have, LOW macro protection in their local excels. You can control this in the programing by changing their security on their setting and re-stating it once the application has been exitted. 2- Try to create a digital signature for your application. I think that this signature has to be accepted in each computer or user that runs this macro. The good thing about it, is that as far as I know, once you are a valid recognized and save macro creator, Window and Excel will not stop you to run that macro in any computer that aknowledge you as a good source. Good luck Argy "TSW632" wrote: Cross posted from Excel.Programming Anyone know why some code would work fine when not plugged into my companys LAN, but not when I am plugged into the LAN? I mean, other than Macro Security, is there something else I should be checking? The Macro Security shows medium in either condition, but the code will not work when I am on the LAN€¦ And while I'm here, anyone know what to change in NumberFormat so a currency symbol will be displayed with negative figures as well as positive? Thanks, Troy Here is the code: Private Sub Worksheet_Calculate() Const CURRENCYTYPES As String = ":GBP£:JPYÂ¥:EUR‚¬:USD$:CAD$:MEX$:BRL $:" Static pv As Variant Dim cv As Variant cv = Me.Range("V35").Value2 'unless the current value (cv) is a 4-char string different than the cached 'previous value (pv), there's nothing to do, so exit quickly If cv = pv Or VarType(cv) < vbString Or Len(CStr(cv)) < 4 Then Exit Sub Else cv = ":" & cv & ":" End If If InStr(1, CURRENCYTYPES, cv, vbTextCompare) 0 Then Me.Range("F49:AF49").NumberFormat = Mid$(cv, 5, 1) & "_([$ -2] * #,##0_);_([$ -2] * (#,##0);_([$ -2] * ""-""_);_(@_)" pv = Mid$(cv, 5, 1) End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
disconnected chart objects | Charts and Charting in Excel | |||
TWO CUSTOM FUNCTIONS NOT BEING CONNECTED | Excel Discussion (Misc queries) | |||
hangs when connected | Excel Discussion (Misc queries) | |||
Excel - let search for more than one disconnected word in a cell | Excel Worksheet Functions | |||
Excel runs slowly, but only when connected to a network | Excel Discussion (Misc queries) |