English 中文(简体)
我指的是一张表格,而不是一个工作单栏。
原标题:I am looking to reference a Table Column instead of a worksheet column
  • 时间:2024-04-12 02:05:24
  •  标签:
  • excel
  • vba

我有以下法典,用于监测特定细胞的变化。 准则参考指标。 但是,如果在表格中增加一栏,则我会使用一栏名称,因此该代码不停。

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 6 Then
          Target.Worksheet.Cells(Target.Row, 15) = Format(Now(), "mmmm d, yyyy at h:mm:ss")
    End If
    If Target.Column = 8 Then
          Target.Worksheet.Cells(Target.Row, 15) = Format(Now(), "mmmm d, yyyy at h:mm:ss")
    End If
End Sub

My table is "AV_Database" Column 6 is "DLR" Column 8 is "MSRP" Column 15 is "Last Price Update"

守则在发挥作用,但在我插入一栏或修改命令时便被打破。 我要通过提及一栏名使这更加有力。

博努斯问题,我还有另一个小组,我想监测一下,以便启动时间序列,但上面的代码没有奏效。 我认为,这是因为囚室是一种由其他囚室决定的公式,而不是价值。 是否也能够使这项工作发挥作用? 这将是第13栏或“德国航天中心CDN”一栏。

事先感谢你们的所有帮助。

问题回答




相关问题
import of excel in SQL imports NULL lines

I have a stored procedure that imports differently formatted workbooks into a database table, does work on them then drops the table. Here is the populating query. SELECT IDENTITY(INT,1,1) AS ID ...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

Excel date to Unix timestamp

Does anyone know how to convert an Excel date to a correct Unix timestamp?

C# GemBox Excel Import Error

I am trying to import an excel file into a data table using GemBox and I keep getting this error: Invalid data value when extracting to DataTable at SourceRowIndex: 1, and SourceColumnIndex: 1. As ...

Importing from excel "applications" using SSIS

I am looking for any tips or resources on importing from excel into a SQL database, but specifically when the information is NOT in column and row format. I am currently doing some pre-development ...

热门标签