Tag: 显示

VBA代码来显示/隐藏象形图

我有一些代码,取决于一个单元格的值,它会显示正确的健康危害象形图。 如果D48中的结果是“AMBER-01”或“绿色”,但对其他结果不起作用,它是否有效? 我尽可能保持简单,但是我不知道为什么它不起作用。 Sub COSHH() 'If statements for visibility of Pictograms If Sheets("COSHH").Range("D48").Value = "RED-01" Then Sheets("Formulation").Shapes.Range(Array("GreenCOSHH")).Visible = msoFalse Sheets("Formulation").Shapes.Range(Array("AmberCOSHH")).Visible = msoFalse Sheets("Formulation").Shapes.Range(Array("RedCOSHH")).Visible = msoTrue Sheets("Formulation").Shapes.Range(Array("RedCOSHH2")).Visible = msoFalse ElseIf Sheets("COSHH").Range("D48").Value = "AMBER-01" Then Sheets("Formulation").Shapes.Range(Array("GreenCOSHH")).Visible = msoFalse Sheets("Formulation").Shapes.Range(Array("AmberCOSHH")).Visible = msoTrue Sheets("Formulation").Shapes.Range(Array("RedCOSHH")).Visible = msoFalse Sheets("Formulation").Shapes.Range(Array("RedCOSHH2")).Visible = msoFalse ElseIf Sheets("COSHH").Range("D48").Value = "AMBER-02" Then Sheets("Formulation").Shapes.Range(Array("GreenCOSHH")).Visible = msoFalse Sheets("Formulation").Shapes.Range(Array("AmberCOSHH")).Visible = […]

显示基于单元格值的行 – Excel VBA

我正在使用以下代码来隐藏基于单元格值的行: Sub HideN() Dim RowCnt As Long, uRng As Range BeginRow = 8 EndRow = 232 ChkCol = 6 For RowCnt = BeginRow To EndRow If Cells(RowCnt, ChkCol).Value = 0 Then If uRng Is Nothing Then Set uRng = Cells(RowCnt, ChkCol) Else Set uRng = Union(uRng, Cells(RowCnt, ChkCol)) End If End If Next RowCnt If […]

从Excel文件获取和显示数据

我有一个超过80行的数据完整的Excel文件。 在特定的列中,我有我在代码中提到的数据。 我正在试图获取这些数据,然后在textView中显示它们。 不幸的是,当我运行我的应用程序,我得到以下显示:名称:jxl.read.biff.NumberRecord@ce3885a等。 你能帮我吗? enter code here public void order(View v){try {AssetManager am = getAssets(); InputStream是= am.open(“data.xls”); 工作簿wb = Workbook.getWorkbook(is); 工作表s = wb.getSheet(0); EditText num=(EditText) findViewById(R.id.getID);//take input for id int row=Integer.parseInt(num.getText().toString()); //i have to get the patient ID from insert Cell name=s.getCell(row,6); Cell sex=s.getCell(row,7); Cell birthdate=s.getCell(row,8); Cell age=s.getCell(row,9); //display("Name: "+name+"/n"); //display("Sex: "+sex+"/n"); //display("Birth Date: […]

Excel:跨电子表格数据查找和显示

search表/工作表 在不同的工作表上分别显示 图1是我想成为search表,我想要一个下拉列表为每个标题(我可以做),但我努力显示来自不同的工作表的所有数据。 每个工作表具有相同的布局和标题,但存储的数据不同。 从网站导入的数据不能在表格中。 当“姓名”下的单元格(所有名称都有一个下拉列表)可以说select了“约翰”时,它将在所有的“约翰”页面上显示数据,以便显示: – John | Manchester| 32 | 131| 1234| 123 | Money – John | Manchester| 32 | 1 |23213| 423 | Debt – John |Manchester |234 |34 | 23 | 2 | Income 当我在(表单下拉列表)中select收入时,它将显示: – Tim |London |34 |45 |435|22134|Income – Dave|Scotland | 34 |23 |234|42 |Income – Jake|Walse […]

取消隐藏Excel应用程序会话

我有一个Excel VBA方法(我没有写它)运行,它所做的第一件事之一是隐藏Excel会话Application.Visible = False 。 但是,该方法完成后,它不会取消隐藏Excel会话,因此它保持打开状态,并在任务pipe理器中列出,但隐藏且看似不可用。 有谁知道,没有打开VBE(所以可以访问即时窗口并运行Application.Visible = True ),如何取消隐藏此Excel会话? 目前,我只需要使用任务pipe理器来终止会话。 这不是一个大规模的交易,但我只是有兴趣,如果有人知道如何复活这样的会议。