0

I create a excel file with vba code in excel 2013 (64 bit version). When I copied the excel file in to another machine which has excel 2013 (32 bit) I have to go to the vide code and compile the code to execute the vba code. I am simply doing change a cell value based on the selection.

Anybody have an idea what is it about?

Thanks

<< adding code>>

Private Sub Worksheet_Change(ByVal Target As Range)

 Dim versionId As String
 versionId = Range("B2").Text


If (Target.Column = 2 Or Target.Column = 1 Or Target.Column = 4) And Target.Row > 15 Then
Application.EnableEvents = False
Dim Row As Range
For Each Row In Target.Rows
Cells(Row.Row, 1).Value2 = "TRUE"
Next Row

End If

Application.EnableEvents = True
End Sub
Community
  • 1
  • 1
udaya726
  • 1,010
  • 6
  • 21
  • 41
  • Please edit your question and add your code and describe what error appears. – lowak Aug 27 '14 at 08:30
  • there is no error appearing :( – udaya726 Aug 27 '14 at 08:51
  • Your VBA code still needs to compiled from human readable 'vba' to machine code and 32bit machine code is not interchangeable with 64bit machine code. Hence the need for recompiling. – Frank Aug 27 '14 at 08:51
  • You shouldn't have to manually compile the code for it to run. What is the code? – Rory Aug 27 '14 at 08:53
  • Is this file saved as *.xlsm or *.xlsb file? – Axel Richter Aug 27 '14 at 09:04
  • Which is the exact message that tells you that you have to compile the code? – Axel Richter Aug 27 '14 at 09:15
  • there is no message or any error appear. I tried to find several ways to fix it. Then I just tried compile the code. Then it works. It works me for every time. – udaya726 Aug 27 '14 at 09:17
  • So simply the macro doesn't run? Mostly this is resulted from security settings. Are you sure, the macro security is setted so that the macro can run? But, if not, this would not healed by manually compiling. The "Compile VBA Project" is a debug option only. So I'm helpless now in this case. – Axel Richter Aug 27 '14 at 09:40
  • @AxelRichter: I have set the macro settings also to run. Thanks for your support – udaya726 Aug 27 '14 at 09:44

0 Answers0